Question
Testing code import java.util.GregorianCalendar; public class ClientTester { public static void main(String args[]) { // Create an individual client, open some policies and then make
Testing code
import java.util.GregorianCalendar; public class ClientTester { public static void main(String args[]) { // Create an individual client, open some policies and then make some claims IndividualClient ic = new IndividualClient("Bob B. Pins"); ic.openPolicyFor(100); ic.openPolicyFor(200, 0.10f); ic.openPolicyFor(300, new GregorianCalendar(2020, 0, 2, 23, 59).getTime()); ic.openPolicyFor(400, new GregorianCalendar(2009, 5, 4, 12, 00).getTime()); Policy p = new Policy(500); System.out.println("Here are the Individual Client's policies:"); for (int i=0; i Expected output Here are the Individual Client's policies: Policy: 0001 amount: $100.00 DepreciatingPolicy: 0002 amount: $200.00 rate: 10.0% ExpiringPolicy: 0003 amount: $300.00 expires: January 02, 2020 (11:59PM) ExpiringPolicy: 0004 amount: $400.00 expired on: June 04, 2009 (12:00PM) Making claims: Claim for policy 0001: $100.00 Claim for policy 0002: $180.00 Claim for policy 0003: $300.00 Claim for policy 0004: $ 0.00 Claim for policy 0005: $ 0.00 Here are the Individual Client's policies after claims: ExpiringPolicy: 0004 amount: $400.00 expired on: June 04, 2009 (12:00PM) DepreciatingPolicy: 0002 amount: $180.00 rate: 10.0% ExpiringPolicy: 0003 amount: $300.00 expires: January 02, 2020 (11:59PM) The total policy coverage for this client: $880.00 Here are the Company Client's policies: Policy: 0006 amount: $1000.00 DepreciatingPolicy: 0007 amount: $2000.00 rate: 10.0% ExpiringPolicy: 0008 amount: $3000.00 expires: January 02, 2020 (11:59PM) ExpiringPolicy: 0009 amount: $4000.00 expired on: June 04, 2009 (12:00PM) Making claims: Claim for policy 0006: $1000.00 Claim for policy 0007: $2000.00 Claim for policy 0008: $3000.00 Claim for policy 0009: $ 0.00 Claim for policy 0005: $ 0.00 Here are the Company Client's policies after claims: Policy: 0006 amount: $1000.00 DepreciatingPolicy: 0007 amount: $1800.00 rate: 10.0% ExpiringPolicy: 0008 amount: $3000.00 expires: January 02, 2020 (11:59PM) ExpiringPolicy: 0009 amount: $4000.00 expired on: June 04, 2009 (12:00PM) The total policy coverage for this client: $9800.00 Cancelling policy #12 ... did it work: false Cancelling policy #8 ... did it work: true The total policy coverage for this client: $6800.00
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started