Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Mudit and Manoj Statefarm 2020 #16

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3d15004
add constructors
muditg317 Oct 11, 2020
afe4504
methods 9 and 10
mniverthi Oct 11, 2020
95c45af
fixed merge conflict
mniverthi Oct 11, 2020
8da36e6
finished 9
mniverthi Oct 11, 2020
4a61fb8
finished 8
mniverthi Oct 11, 2020
aef45c3
finished 7
mniverthi Oct 11, 2020
8a5850b
csv mapper??
muditg317 Oct 11, 2020
d176b2f
fic gitignore
muditg317 Oct 11, 2020
9a7cfa3
fix merge error
muditg317 Oct 11, 2020
dfbf15b
renamed to has and finished 6
mniverthi Oct 11, 2020
2b4826a
updated constructor
mniverthi Oct 11, 2020
6f9d7ca
finished 5
mniverthi Oct 11, 2020
b3eefcc
added custom 1
mniverthi Oct 11, 2020
707015c
complete #2-#4
muditg317 Oct 11, 2020
2b09fe7
Merge branch 'main' of https://github.com/muditg317/2020-StateFarm-Co…
muditg317 Oct 11, 2020
96daa67
some clinflicts
muditg317 Oct 11, 2020
4e46009
added custom 2
mniverthi Oct 11, 2020
cae59b9
Merge branch 'main' of https://github.com/muditg317/2020-StateFarm-Co…
mniverthi Oct 11, 2020
311d22e
use stream
muditg317 Oct 11, 2020
6523a54
Merge branch 'main' of https://github.com/muditg317/2020-StateFarm-Co…
muditg317 Oct 11, 2020
3722e04
fixed csv parser thing
mniverthi Oct 11, 2020
433ca4b
Merge branch 'main' of https://github.com/muditg317/2020-StateFarm-Co…
mniverthi Oct 11, 2020
52c12d3
fix tests
muditg317 Oct 11, 2020
7169cb3
added tests
mniverthi Oct 11, 2020
ece9a12
use streams
muditg317 Oct 11, 2020
b1ba1e1
fixed merge
mniverthi Oct 11, 2020
a053609
fixed yet another merge
mniverthi Oct 11, 2020
9e3df7f
finished tests
mniverthi Oct 11, 2020
f88cef4
start code cleanup
muditg317 Oct 11, 2020
7164222
Merge branch 'main' of https://github.com/muditg317/2020-StateFarm-Co…
muditg317 Oct 11, 2020
90752e0
added javadocs
mniverthi Oct 11, 2020
d0dd2ec
added javadocs
mniverthi Oct 11, 2020
4e8239b
update feedback
muditg317 Oct 11, 2020
d87efbd
merge conflict
muditg317 Oct 11, 2020
32630cc
fedback
muditg317 Oct 11, 2020
14483bd
move javadocs
muditg317 Oct 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=crlf
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.idea
.idea/**/*

*.iml

target
target/**/*
25 changes: 21 additions & 4 deletions feedback.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
Your team (name of each individual participating):
How many JUnits were you able to get to pass?
Your team (name of each individual participating): Mudit Gupta, Manoj Niverthi
How many JUnits were you able to get to pass? 10

Document and describe any enhancements included to help the judges properly grade your submission.
Step 1:
Step 2:
Step 1: We used Checkstyle to make sure the code was readable according to publicly agreed upon standards.
Step 2: We made all fileIO related methods and tests throw IOException to account for when a file is not found.
If a file is not found, is does not make sense to just return an empty list, as we should instead tell the user that they are attempting to read a non-present file.
We also changed some of the tests to throw the IOException.
Step 3: We noticed that the vehiclesInsured field was unnecessarily declared as an Integer in the Customer class, so we converted it to an int.
Step 4: The Customer class was using a String for the totalMonthlyPremium because of a dollar sign, so we converted it to an int.
This makes future use of the value much more intuitive and meaningful.
We also updated the test values in the JUnit to reflect the better implementation.
Step 5: We improved the javadocs for all of the provided methods to make their use easier.
We also generated the javadoc HTML for this project, so that they can be more easily referenced. These can be found in javadocs/index.html
Step 6: We created 2 methods in the CsvUtil class that can be used to find other patterns in the data.
We created getCustomersBasedOnNumberOfPolicies and getVendorsForCustomerBasedOnArea.
We also created tests for these two methods.
Step 7: We implemented the Builder pattern for each of the data classes. Although unused for this implementation, builders are a very helpful design pattern to use when a constructor has many hard-to-remember parameters.
If a user wanted to add functionality for creating objects and writing to CSV, rather than reading, the builder would prove very valuable for code readability/maintainability.


Feedback for the coding competition? Things you would like to see in future events?
Some of the requirements in the javadocs wre a bit unclear.
For #5, we had to do customer.getYearsOfService() == yearsOfService
But for #7, we had to do vendor.getVendorRating() >= vendorRating
Whether or not we use > or == was a bit unclear and required us to guess as to why the tests failed.
19 changes: 19 additions & 0 deletions javadocs/allclasses-frame.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_232) on Sun Oct 11 00:54:18 EDT 2020 -->
<title>All Classes</title>
<meta name="date" content="2020-10-11">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<h1 class="bar">All&nbsp;Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="sf/codingcompetition2020/CodingCompCsvUtil.html" title="class in sf.codingcompetition2020" target="classFrame">CodingCompCsvUtil</a></li>
</ul>
</div>
</body>
</html>
19 changes: 19 additions & 0 deletions javadocs/allclasses-noframe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_232) on Sun Oct 11 00:54:18 EDT 2020 -->
<title>All Classes</title>
<meta name="date" content="2020-10-11">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<h1 class="bar">All&nbsp;Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="sf/codingcompetition2020/CodingCompCsvUtil.html" title="class in sf.codingcompetition2020">CodingCompCsvUtil</a></li>
</ul>
</div>
</body>
</html>
120 changes: 120 additions & 0 deletions javadocs/constant-values.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_232) on Sun Oct 11 00:54:18 EDT 2020 -->
<title>Constant Field Values</title>
<meta name="date" content="2020-10-11">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Constant Field Values";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="sf/codingcompetition2020/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="sf/codingcompetition2020/package-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
<li><a href="constant-values.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Constant Field Values" class="title">Constant Field Values</h1>
<h2 title="Contents">Contents</h2>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="sf/codingcompetition2020/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="sf/codingcompetition2020/package-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
<li><a href="constant-values.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
120 changes: 120 additions & 0 deletions javadocs/deprecated-list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_232) on Sun Oct 11 00:54:18 EDT 2020 -->
<title>Deprecated List</title>
<meta name="date" content="2020-10-11">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Deprecated List";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="sf/codingcompetition2020/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="sf/codingcompetition2020/package-tree.html">Tree</a></li>
<li class="navBarCell1Rev">Deprecated</li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
<li><a href="deprecated-list.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Deprecated API" class="title">Deprecated API</h1>
<h2 title="Contents">Contents</h2>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="sf/codingcompetition2020/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="sf/codingcompetition2020/package-tree.html">Tree</a></li>
<li class="navBarCell1Rev">Deprecated</li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
<li><a href="deprecated-list.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
Loading