Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Assignment 6 Scenario: You have been hired by the National Insurance Company to create a program to track insurance policies for all its customers.

Programming Assignment 6 Scenario: You have been hired by the National Insurance Company to create a program to track insurance policies for all its customers. National Insurance provides three types of insurance: automobile, home and life insurance. The program should be able to track up to 100 policies.
You have been hired by the National Insurance Company to create a program to track insurance policies for all its customers. National Insurance provides three types of insurance: automobile, home and life insurance. The program should be able to track up to 100 policies.
For each policy, the solution should capture the following...
Field
Type
Description
Validations
Policy number
Alphanumeric
Unique identifier for the policy
Ex: A123456789
Must start with a letter (A-Z) followed by 9 digits
Must have a length of 10 characters
Policy Owner
Alphanumeric
Full name of the policy owner
Required, cannot be blank
Yearly Premium
Decimal
Dollar amount for the yearly premium paid for the insurance
Required
For each automobile policy, the solution should also capture the following...
Field
Type
Description
Validations
Vehicle ID No (VIN)
Alphanumeric
Unique Id for the vehicle
Ex: 2GCEC19Z8L1159877
Required, cannot be blank
Must have a length of 17 characters,
Cannot contain the letters O (o), I (i), and Q (q)(to avoid confusion with numerals 0,1, and 9).
Make
Alphanumeric
Name of manufacturer
Ex: Dodge
Required, cannot be blank
Model
Alphanumeric
Name of model
Ex: Charger
Required, cannot be blank
For each home policy, the solution should also capture the following...
Field
Type
Description
Validations
Street Address
Alphanumeric
Home address
Ex: 123 Main Street
Required, cannot be blank
Year Built
Numeric
Year that the home was built
Ex: 2022
Must be a number between 18002022
Deductible
Decimal
Dollar amount for the deductible for any claims
Required
For each life insurance policy, the solution should also capture the following...
Field
Type
Description
Validations
Beneficiary Name
Alphanumeric
Full name for the beneficiary for the policy
Required, cannot be blank
Face Value
Decimal
Dollar amount of the policy
Required
Based on the provided information, create an efficient, object-oriented solution with good design principles that will allow a user to manage policies.
To do this, the solution should have a menu with the following capabilities:
Add Policy
This capability will allow a user to add a policy. The user should specify if the policy is for home, auto, or life. Once the type of policy has been selected, the user should be prompted for all required fields for the policy type.
Remove Item
This capability will allow a user to select any policy and remove it from the list.
View policies
This capability will allow a user to see all the policies. All policy fields should be displayed and formatted
Quit
This capability will allow a user to end working with the solution. It will print a message thanking the user for using the solution.
Other Requirements:
Your solution must use object-oriented techniques, including appropriate constants, constructors, accessors, validating mutators, and special purpose methods, including a toString() method. No points earned for a procedural solution.
Your solution must contain reasonably appropriate validation. Try to think about what might be considered appropriate as you are designing your solution beyond what has already been explicitly provided.
Your solution must demonstrate use of arrays
Your solution must demonstrate the concept of inheritance.
Your solution must be designed as a modular solution using methods other than main, with each method performing one task.
Your solution must not import any Java library other than JOptionPane.
Your solution may not use regular expressions for validation.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions