diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..385f27a
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "java.configuration.updateBuildConfiguration": "interactive"
+}
diff --git a/FEEDBACK.md b/FEEDBACK.md
index 010fecd..3953048 100644
--- a/FEEDBACK.md
+++ b/FEEDBACK.md
@@ -1,13 +1,38 @@
# Feedback
-1. Your team:
-2. Name of each individual participating:
-3. How many unit tests were you able to pass?
+1. Your team: Preston Roesslet
+2. Name of each individual participating: Preston Roesslet
+3. How many unit tests were you able to pass? 13 - However, I believe that I would pass all 14 of them if Issue #9 had been resolved. At the time of my submission, Issue #9 had yet to be resolved, so I wasn't sure how to move forward with Test Set 3 - Test 10
4. Document and describe any enhancements included to help the judges properly grade your submission.
- - Example One
- - Example Two
- - Example Three
+
+ I implemented a REST Api to interact with the data from the problem set. I utilized Spring Boot. The Spring Boot application is initialized in the RestApi class. I then created all of the endpoints inside of the ApiController.java file.
+
+ To run the Spring Boot application, run `mvn spring-boot:run`. The required packages have already been added to my pom.xml file. It runs on localhost:8080 and below is a list of the available endpoints:
+
+ - /numberClosedClaims - returns the number of claims where the status is closed
+ - /numClaims/{id} - returns the number of claims associated with the given claim handler ID
+ - /numDisasters/{state} - returns the number of disasters in the given state
+ - /disasterTotalCost/{id} - returns the total claim cost for the given disaster ID
+ - /averageClaimCost/{id} - returns the average claim cost for the given claim handler ID
+ - /stateWithMostDisasters - returns the state with the highest number of disasters
+ - /stateWithLeastDisasters - returns the state with the highest number of disasters
+ - /mostSpokenLanguage/{state} - returns the language spoken most by claim handlers in the given state
+ - /numOpenClaims/{id}/{minSeverity} - returns the number of open claims for the given agent ID and above the given minimum severity
+ - /numDistastersDeclaredAfterEndDate - returns the number of disasters where it was declared after it ended
+ - /agentsTotalClaimCost - returns a map of agent ID's and their total claim cost
+ - /disasterClaimDensity/{id} - returns the density of the given disaster ID based on the number of claims and the impact radius
+
+ I also implemented some additional methods which can be utilized with the following endpoints:
+
+ - /agents - returns a list of all agents
+ - /claimHandlers - returns a list of all agents
+
+ This could be further extended to include persistent data through a database rather than just json files, or even creating a front end to view/edit the data. However, given the time constraints for this competition, these were not feasible to implement.
5. Any feedback for the coding competition? Things you would like to see in future events?
+ One thing in particular that I think could be better is ensuring that the test cases and skeleton code are bug free. While I know that programming certainly comes along with bugs, it felt as though there were many issues, some of which weren't being resolved until towards the end of the competition. This made it difficult to complete all tasks in an efficient manner and I could not complete one of the test cases at all prior to submission due to this.
+
+ Overall though this was a very fun competition!
+
This form can also be emailed to [codingcompetition@statefarm.com](mailto:codingcompetition@statefarm.com). Just make sure that you include a link to your GitHub pull requests.
diff --git a/java/pom.xml b/java/pom.xml
index 2f928ee..6ddd6fe 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -24,7 +24,44 @@
gson
2.10.1
-
+
+ org.springframework.boot
+ spring-boot-starter-web
+ 3.1.4
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+ 3.1.4
+
+
+
+ org.junit.vintage
+ junit-vintage-engine
+ 5.10.0
+ test
+
+
+ org.slf4j
+ slf4j-api
+ 2.0.9
+
+
+ org.slf4j
+ slf4j-simple
+ 2.0.9
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 3.1.4
+
+
+
+
diff --git a/java/src/main/java/com/statefarm/codingcompetition/ApiController.java b/java/src/main/java/com/statefarm/codingcompetition/ApiController.java
new file mode 100644
index 0000000..e10616c
--- /dev/null
+++ b/java/src/main/java/com/statefarm/codingcompetition/ApiController.java
@@ -0,0 +1,93 @@
+package com.statefarm.codingcompetition;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.statefarm.codingcompetition.simpledatatool.controller.SimpleDataTool;
+import com.statefarm.codingcompetition.simpledatatool.model.Agent;
+import com.statefarm.codingcompetition.simpledatatool.model.Claim;
+import com.statefarm.codingcompetition.simpledatatool.model.ClaimHandler;
+import com.statefarm.codingcompetition.simpledatatool.model.Disaster;
+
+@RestController
+public class ApiController {
+
+ SimpleDataTool dataService = new SimpleDataTool();
+
+
+ @GetMapping("/numberClosedClaims")
+ public int getNumClosedClaims() {
+ return dataService.getNumClosedClaims();
+ }
+
+ @GetMapping("/numClaims/{id}")
+ public int getNumClaims(@PathVariable("id") int id) {
+ return dataService.getNumClaimsForClaimHandlerId(id);
+ }
+
+ @GetMapping("/numDisasters/{state}")
+ public int getNumDisasters(@PathVariable("state") String state) {
+ return dataService.getNumDisastersForState(state);
+ }
+
+ @GetMapping("/disasterTotalCost/{id}")
+ public Double getDisasterTotalCost(@PathVariable("id") int id) {
+ return dataService.getTotalClaimCostForDisaster(id);
+ }
+
+ @GetMapping("/averageClaimCost/{id}")
+ public Double getAverageClaimCost(@PathVariable("id") int id) {
+ return dataService.getAverageClaimCostforClaimHandler(id);
+ }
+
+ @GetMapping("/stateWithMostDisasters")
+ public String getStateWithMostDisasters() {
+ return dataService.getStateWithTheMostDisasters();
+ }
+
+ @GetMapping("/stateWithLeastDisasters")
+ public String getStateWithLeastDisasters() {
+ return dataService.getStateWithTheLeastDisasters();
+ }
+
+ @GetMapping("/mostSpokenLanguage/{state}")
+ public String getMostSpokenLanguage(@PathVariable("state") String state) {
+ return dataService.getMostSpokenAgentLanguageByState(state);
+ }
+
+ @GetMapping("/numOpenClaims/{id}/{minSeverity}")
+ public int getNumOpenClaims(@PathVariable("id") int id, @PathVariable("minSeverity") int minSeverity) {
+ return dataService.getNumOfOpenClaimsForAgentAndSeverity(id, minSeverity);
+ }
+
+ @GetMapping("/numDistastersDeclaredAfterEndDate")
+ public int getNumDistastersDeclaredAfterEndDate() {
+ return dataService.getNumDisastersDeclaredAfterEndDate();
+ }
+
+ @GetMapping("/agentsTotalClaimCost")
+ public Map getAgentsTotalClaimCost() {
+ return dataService.buildMapOfAgentsToTotalClaimCost();
+ }
+
+ @GetMapping("/disasterClaimDensity/{id}")
+ public Float getDisasterClaimDensity(@PathVariable("id") int id) {
+ return dataService.calculateDisasterClaimDensity(id);
+ }
+
+ // Additional endpoints
+ @GetMapping("/agents")
+ public List getAgents() {
+ return dataService.getAgents();
+ }
+
+ @GetMapping("/claimHandlers")
+ public List getClaimHandlers() {
+ return dataService.getClaimHandlers();
+ }
+}
+
diff --git a/java/src/main/java/com/statefarm/codingcompetition/RestApi.java b/java/src/main/java/com/statefarm/codingcompetition/RestApi.java
new file mode 100644
index 0000000..0e1a9a3
--- /dev/null
+++ b/java/src/main/java/com/statefarm/codingcompetition/RestApi.java
@@ -0,0 +1,11 @@
+package com.statefarm.codingcompetition;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class RestApi {
+ public static void main(String[] args) {
+ SpringApplication.run(RestApi.class, args);
+ }
+}
diff --git a/java/src/main/java/com/statefarm/codingcompetition/simpledatatool/controller/SimpleDataTool.java b/java/src/main/java/com/statefarm/codingcompetition/simpledatatool/controller/SimpleDataTool.java
index b1e78b5..338cdf8 100644
--- a/java/src/main/java/com/statefarm/codingcompetition/simpledatatool/controller/SimpleDataTool.java
+++ b/java/src/main/java/com/statefarm/codingcompetition/simpledatatool/controller/SimpleDataTool.java
@@ -1,5 +1,10 @@
package com.statefarm.codingcompetition.simpledatatool.controller;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.time.LocalDate;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -58,7 +63,17 @@ public List getDisasters() {
* @return number of closed claims
*/
public int getNumClosedClaims() {
- return 0;
+ List claims = getClaims();
+ int numClosedClaims = 0;
+
+ // If claim is closed, increment counter
+ for (Claim claim : claims) {
+ if (claim.getStatus().equals("Closed")) {
+ numClosedClaims++;
+ }
+ }
+
+ return numClosedClaims;
}
/**
@@ -68,7 +83,17 @@ public int getNumClosedClaims() {
* @return number of claims assigned to claim handler
*/
public int getNumClaimsForClaimHandlerId(int id) {
- return 0;
+ List claims = getClaims();
+ int numClaimsForClaimHandlerId = 0;
+
+ // If claim handler id matches, increment counter
+ for (Claim claim : claims) {
+ if (claim.getClaim_handler_assigned_id() == id) {
+ numClaimsForClaimHandlerId++;
+ }
+ }
+
+ return numClaimsForClaimHandlerId;
}
/**
@@ -79,7 +104,17 @@ public int getNumClaimsForClaimHandlerId(int id) {
* @return number of disasters for state
*/
public int getNumDisastersForState(String stateName) {
- return -1;
+ List disasters = getDisasters();
+ int numDisastersForState = 0;
+
+ // If state name matches, increment counter
+ for (Disaster disaster : disasters) {
+ if (disaster.getState().equals(stateName)) {
+ numDisastersForState++;
+ }
+ }
+
+ return numDisastersForState;
}
// endregion
@@ -93,10 +128,36 @@ public int getNumDisastersForState(String stateName) {
* @return estimate cost of disaster, rounded to the nearest hundredths place
* returns null if no claims are found
*/
- public Float getTotalClaimCostForDisaster(int id) {
- return -0.01f;
+ public Double getTotalClaimCostForDisaster(int id) {
+ List claims = getClaims();
+
+ // Map of disaster to cost
+ Map disasterToCost = new HashMap();
+
+ // Populate map with all disasters
+ for (Claim claim : claims) {
+ int disasterId = claim.getDisaster_id();
+ Double claimCost = claim.getEstimate_cost();
+
+ if (disasterToCost.containsKey(disasterId)) {
+ Double newCost = disasterToCost.get(disasterId) + claimCost;
+ disasterToCost.put(disasterId, newCost);
+ } else {
+ disasterToCost.put(disasterId, claimCost);
+ }
+ }
+
+ // Return cost if disaster exists, otherwise return null
+ if (disasterToCost.containsKey(id)) {
+ BigDecimal bd = new BigDecimal(disasterToCost.get(id));
+ bd = bd.setScale(2, RoundingMode.HALF_UP);
+ return bd.doubleValue();
+ } else {
+ return null;
+ }
}
+
/**
* Gets the average estimated cost of all claims assigned to a claim handler
*
@@ -104,8 +165,38 @@ public Float getTotalClaimCostForDisaster(int id) {
* @return average cost of claims, rounded to the nearest hundredths place,
* or null if no claims are found
*/
- public Float getAverageClaimCostforClaimHandler(int id) {
- return -0.01f;
+ public Double getAverageClaimCostforClaimHandler(int id) {
+ List claims = getClaims();
+
+ // Map of claim handler to cost
+ Map claimHandlerToCost = new HashMap();
+
+ // Populate map with all claim handlers
+ for (Claim claim : claims) {
+ int claimHandlerId = claim.getClaim_handler_assigned_id();
+ Double claimCost = claim.getEstimate_cost();
+
+ if (claimHandlerToCost.containsKey(claimHandlerId)) {
+ Double newCost = claimHandlerToCost.get(claimHandlerId) + claimCost;
+ claimHandlerToCost.put(claimHandlerId, newCost);
+ } else {
+ claimHandlerToCost.put(claimHandlerId, claimCost);
+ }
+ }
+
+ // Return average cost if claim handler exists, otherwise return null
+ if (claimHandlerToCost.containsKey(id)) {
+ int numClaims = getNumClaimsForClaimHandlerId(id);
+ Double totalCost = claimHandlerToCost.get(id);
+ Double averageCost = totalCost / numClaims;
+
+ BigDecimal bd = new BigDecimal(averageCost);
+ bd = bd.setScale(2, RoundingMode.HALF_UP);
+
+ return bd.doubleValue();
+ } else {
+ return null;
+ }
}
/**
@@ -121,7 +212,42 @@ public Float getAverageClaimCostforClaimHandler(int id) {
* @return single name of state
*/
public String getStateWithTheMostDisasters() {
- return null;
+ List statesWithMostDisasters = new ArrayList();
+ List disasters = getDisasters();
+
+ // Map of state to number of disasters
+ Map stateToNumDisasters = new HashMap();
+
+ // Populate map with all states and number of disasters
+ for (Disaster disaster : disasters) {
+ String state = disaster.getState();
+
+ if (stateToNumDisasters.containsKey(state)) {
+ int newNumDisasters = stateToNumDisasters.get(state) + 1;
+ stateToNumDisasters.put(state, newNumDisasters);
+ } else {
+ stateToNumDisasters.put(state, 1);
+ }
+ }
+
+ // Find max number of disasters. Uses a list in case of ties
+ int maxNumDisasters = 0;
+
+ for (String state : stateToNumDisasters.keySet()) {
+ int numDisasters = stateToNumDisasters.get(state);
+
+ if (numDisasters > maxNumDisasters) {
+ maxNumDisasters = numDisasters;
+ statesWithMostDisasters.clear();
+ statesWithMostDisasters.add(state);
+ } else if (numDisasters == maxNumDisasters) {
+ statesWithMostDisasters.add(state);
+ }
+ }
+
+ // If there is a tie, we will have a list of states. Sort and return the first one alphabetically
+ statesWithMostDisasters.sort(String::compareToIgnoreCase);
+ return statesWithMostDisasters.get(0);
}
/**
@@ -137,7 +263,42 @@ public String getStateWithTheMostDisasters() {
* @return single name of state
*/
public String getStateWithTheLeastDisasters() {
- return null;
+ List statesWithLeastDisasters = new ArrayList();
+ List disasters = getDisasters();
+
+ // Map of state to number of disasters
+ Map stateToNumDisasters = new HashMap();
+
+ // Populate map with all states and number of disasters
+ for (Disaster disaster : disasters) {
+ String state = disaster.getState();
+
+ if (stateToNumDisasters.containsKey(state)) {
+ int newNumDisasters = stateToNumDisasters.get(state) + 1;
+ stateToNumDisasters.put(state, newNumDisasters);
+ } else {
+ stateToNumDisasters.put(state, 1);
+ }
+ }
+
+ // Find the minimum number of disasters. Uses a list in case of ties
+ int maxNumDisasters = Integer.MAX_VALUE;
+
+ for (String state : stateToNumDisasters.keySet()) {
+ int numDisasters = stateToNumDisasters.get(state);
+
+ if (numDisasters < maxNumDisasters) {
+ maxNumDisasters = numDisasters;
+ statesWithLeastDisasters.clear();
+ statesWithLeastDisasters.add(state);
+ } else if (numDisasters == maxNumDisasters) {
+ statesWithLeastDisasters.add(state);
+ }
+ }
+
+ // If there is a tie, we will have a list of states. Sort and return the first one alphabetically
+ statesWithLeastDisasters.sort(String::compareToIgnoreCase);
+ return statesWithLeastDisasters.get(0);
}
/**
@@ -149,7 +310,56 @@ public String getStateWithTheLeastDisasters() {
* or empty string if state doesn't exist
*/
public String getMostSpokenAgentLanguageByState(String string) {
- return null;
+ List agents = getAgents();
+ Map languageToNumAgents = new HashMap();
+
+ // Loop through all agents to populate the map
+ for (Agent agent : agents) {
+ String state = agent.getState();
+
+ // Gets the primary and secondary language of the agent
+ String language1 = agent.getPrimary_language();
+ String language2 = agent.getSecondary_language();
+
+ // If state matches, add languages to map
+ if (state.equalsIgnoreCase(string)) {
+ // Add primary language to map - ignore English
+ if (!language1.equalsIgnoreCase("English")) {
+ if (languageToNumAgents.containsKey(language1)) {
+ int newNumAgents = languageToNumAgents.get(language1) + 1;
+ languageToNumAgents.put(language1, newNumAgents);
+ } else {
+ languageToNumAgents.put(language1, 1);
+ }
+ }
+
+ // Add secondary language to map ignore English
+ if (!language2.equalsIgnoreCase("English")) {
+ if (languageToNumAgents.containsKey(language2)) {
+ int newNumAgents = languageToNumAgents.get(language2) + 1;
+ languageToNumAgents.put(language2, newNumAgents);
+ } else {
+ languageToNumAgents.put(language2, 1);
+ }
+ }
+ }
+ }
+
+ // Find the most spoken language
+ int maxNumAgents = 0;
+ String mostSpokenLanguage = "";
+
+ for (String language : languageToNumAgents.keySet()) {
+ int numAgents = languageToNumAgents.get(language);
+
+ if (numAgents > maxNumAgents) {
+ maxNumAgents = numAgents;
+ mostSpokenLanguage = language;
+ }
+ }
+
+ return mostSpokenLanguage;
+
}
/**
@@ -166,7 +376,36 @@ public String getMostSpokenAgentLanguageByState(String string) {
* null if agent does not exist, or agent has no claims (open or not)
*/
public Integer getNumOfOpenClaimsForAgentAndSeverity(int agentId, int minSeverityRating) {
- return -2;
+ // If rating is out of bounds, return -1
+ if (minSeverityRating < 1 || minSeverityRating > 10) {
+ return -1;
+ }
+
+ List claims = getClaims();
+
+ // Map of agent to number of open claims
+ Map agentToNumOpenClaims = new HashMap();
+
+ for (Claim claim : claims) {
+ int claimAgentId = claim.getAgent_assigned_id();
+ int claimSeverityRating = claim.getSeverity_rating();
+ String claimStatus = claim.getStatus();
+
+ if (claimAgentId == agentId && claimSeverityRating >= minSeverityRating && !claimStatus.equals("Closed")) {
+ if (agentToNumOpenClaims.containsKey(claimAgentId)) {
+ int newNumOpenClaims = agentToNumOpenClaims.get(claimAgentId) + 1;
+ agentToNumOpenClaims.put(claimAgentId, newNumOpenClaims);
+ } else {
+ agentToNumOpenClaims.put(claimAgentId, 1);
+ }
+ }
+ }
+
+ if (agentToNumOpenClaims.containsKey(agentId)) {
+ return agentToNumOpenClaims.get(agentId);
+ } else {
+ return null;
+ }
}
// endregion
@@ -179,7 +418,20 @@ public Integer getNumOfOpenClaimsForAgentAndSeverity(int agentId, int minSeverit
* @return number of disasters where the declared date is after the end date
*/
public int getNumDisastersDeclaredAfterEndDate() {
- return -1;
+ List disasters = getDisasters();
+ int numDisastersDeclaredAfterEndDate = 0;
+
+ // Loop through disasters and increment counter if declared date is after end date
+ for (Disaster disaster : disasters) {
+ LocalDate declaredDate = disaster.getDeclared_date();
+ LocalDate endDate = disaster.getEnd_date();
+
+ if (declaredDate.isAfter(endDate)) {
+ numDisastersDeclaredAfterEndDate++;
+ }
+ }
+
+ return numDisastersDeclaredAfterEndDate;
}
/**
@@ -194,7 +446,37 @@ public int getNumDisastersDeclaredAfterEndDate() {
* to the agent
*/
public Map buildMapOfAgentsToTotalClaimCost() {
- return null;
+ /*
+ Note - I believe the return type here should be a Map due to Issue #9, however
+ I left it as is since we are not allowed to change the test files and the test case expects
+ a Map to be returned
+ */
+
+ Map agentToTotalClaimCost = new HashMap();
+ List claims = getClaims();
+ List agents = getAgents();
+
+ // Pre-Populate map with all agents
+ for (Agent agent : agents) {
+ Integer agentId = agent.getId();
+ agentToTotalClaimCost.put(agentId, 0.0f);
+ }
+
+ // Loop through claims and add cost to agent's total claim cost
+ for (Claim claim : claims) {
+ int agentId = claim.getAgent_assigned_id();
+ Double claimCost = claim.getEstimate_cost();
+
+ if (agentToTotalClaimCost.containsKey(agentId)) {
+ Float prevCost = agentToTotalClaimCost.get(agentId);
+ Float newCost = prevCost + claimCost.floatValue();
+ agentToTotalClaimCost.put(agentId, newCost);
+ } else {
+ agentToTotalClaimCost.put(agentId, claimCost.floatValue());
+ }
+ }
+
+ return agentToTotalClaimCost;
}
/**
@@ -210,8 +492,52 @@ public Map buildMapOfAgentsToTotalClaimCost() {
* thousandths place
* null if disaster does not exist
*/
- public float calculateDisasterClaimDensity(int id) {
- return -0.01f;
+ public Float calculateDisasterClaimDensity(int id) {
+ List claims = getClaims();
+ List disasters = getDisasters();
+
+ // Map of disaster to claims
+ Map> disasterToClaims = new HashMap>();
+
+ // Populate map with all disasters
+ for (Claim claim : claims) {
+ int disasterId = claim.getDisaster_id();
+
+ if (disasterToClaims.containsKey(disasterId)) {
+ List newClaims = disasterToClaims.get(disasterId);
+ newClaims.add(claim);
+ disasterToClaims.put(disasterId, newClaims);
+ } else {
+ List newClaims = new ArrayList();
+ newClaims.add(claim);
+ disasterToClaims.put(disasterId, newClaims);
+ }
+ }
+
+ // Map of disaster to impact radius
+ Map disasterToImpactRadius = new HashMap();
+
+ for (Disaster disaster : disasters) {
+ int disasterId = disaster.getId();
+ float impactRadius = disaster.getRadius_miles();
+
+ disasterToImpactRadius.put(disasterId, impactRadius);
+ }
+
+ // If disaster exists, calculate density, otherwise return null
+ if (disasterToClaims.containsKey(id)) {
+ List claimsForDisaster = disasterToClaims.get(id);
+ float impactRadius = disasterToImpactRadius.get(id);
+ float area = (float) (Math.PI * Math.pow(impactRadius, 2));
+ float density = claimsForDisaster.size() / area;
+
+ BigDecimal bd = new BigDecimal(Float.toString(density));
+ bd = bd.setScale(5, RoundingMode.HALF_UP);
+ return bd.floatValue();
+ } else {
+ return null;
+ }
+
}
// endregion
@@ -232,7 +558,27 @@ public float calculateDisasterClaimDensity(int id) {
* @return three strings of month and year, descending order of highest claims
*/
public String[] getTopThreeMonthsWithHighestNumOfClaimsDesc() {
- return new String[1];
+ return new String[3];
+ }
+
+ // Additional Methods (not required for competition)
+
+ /**
+ * Gets all agents
+ *
+ * @return list of all agents
+ */
+ public List getAllAgents() {
+ return getAgents();
+ }
+
+ /**
+ * Gets all claim handlers
+ *
+ * @return list of all claim handlers
+ */
+ public List getAllClaimHandlers() {
+ return getClaimHandlers();
}
// endregion
diff --git a/java/src/main/java/com/statefarm/codingcompetition/simpledatatool/model/Claim.java b/java/src/main/java/com/statefarm/codingcompetition/simpledatatool/model/Claim.java
index db223d9..70e943e 100644
--- a/java/src/main/java/com/statefarm/codingcompetition/simpledatatool/model/Claim.java
+++ b/java/src/main/java/com/statefarm/codingcompetition/simpledatatool/model/Claim.java
@@ -7,7 +7,7 @@ public class Claim {
private static final Gson GSON = new Gson();
private int id, disaster_id, severity_rating, agent_assigned_id, claim_handler_assigned_id;
- private float estimate_cost;
+ private Double estimate_cost;
private boolean total_loss, loss_of_life;
private String status, type;
@@ -51,11 +51,11 @@ public void setClaim_handler_assigned_id(int claim_handler_assigned_id) {
this.claim_handler_assigned_id = claim_handler_assigned_id;
}
- public float getEstimate_cost() {
+ public Double getEstimate_cost() {
return this.estimate_cost;
}
- public void setEstimate_cost(float estimate_cost) {
+ public void setEstimate_cost(Double estimate_cost) {
this.estimate_cost = estimate_cost;
}