Question: You will examine Java source code for an insurance project and build a compliant UML sequence diagram to fully represent the private static method createCarPolicyAndClaim()
You will examine Java source code for an insurance project and build a compliant UML sequence diagram to fully represent the private static method createCarPolicyAndClaim() in the Driver class.
Please make sure that you represent the loop correctly, when all claims are displayed in the forEach() method.
You can draw the diagram by hand and insert a picture into a Word or PDF document.

package insurance; import java.time. LocalDate; public class Driver { public static void main(String[] args) { createCarPolicyAndClaim(); } private static void createCarPolicyAndClaim () { // First make a customer Customer hugo = new Customer(132991928L, "Hugo", "Weaving", "weaving@matrix.org", "6092281836"); // Then make and display a car policy for the customer CarPolicy p = new CarPolicy("FDW192", 200000, hugo, 34219098721431L, "Toyota", "Camry", 2020, 23900, CarPolicy.CarInsuranceType. GAP); p.display(); // Create a claim and file it against the policy Claim claim = new Claim("The", "Oracle", claim.ClaimType. FACTUAL, LocalDate.now(), 750, "Red pill swalowing."); p.fileclaim(claim); // File an update to the claim p.fileclaim( "F-1001", "the", "Oracle", Claim.ClaimType. FACTUAL, LocalDate.now(), 750, "Blue pill swalowing."); // Display all claims for the policy p.getClaims ().values().forEach(c => c.display()); | package insurance; import java.time. LocalDate; public class Driver { public static void main(String[] args) { createCarPolicyAndClaim(); } private static void createCarPolicyAndClaim () { // First make a customer Customer hugo = new Customer(132991928L, "Hugo", "Weaving", "weaving@matrix.org", "6092281836"); // Then make and display a car policy for the customer CarPolicy p = new CarPolicy("FDW192", 200000, hugo, 34219098721431L, "Toyota", "Camry", 2020, 23900, CarPolicy.CarInsuranceType. GAP); p.display(); // Create a claim and file it against the policy Claim claim = new Claim("The", "Oracle", claim.ClaimType. FACTUAL, LocalDate.now(), 750, "Red pill swalowing."); p.fileclaim(claim); // File an update to the claim p.fileclaim( "F-1001", "the", "Oracle", Claim.ClaimType. FACTUAL, LocalDate.now(), 750, "Blue pill swalowing."); // Display all claims for the policy p.getClaims ().values().forEach(c => c.display()); |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
