If the return value of insurable in the insureprocess


A car insurance company rates cars for insurability on two criteria-

1. Model of car. This company only insures Ford, Chevy and Toyota cars.

2. Year of car. Anything older than 1990 is not insured.

Write a Java program to enter the make and year of a car and tell the user if the car can be insured.

Follow this hierarchy chart to design the program:

1. The Initialize module is the welcome module. The module should also explain the purpose of the program before execution is passed on to the insureProcess module.

2. The InsureProcess module asks for the model of the car. That car model is then passed to the CheckModel module. If the car model is a Chevy, Ford, or a Toyota it returns a value of true to the insurable variable.

3. If the return value of insurable in the InsureProcess module is true, the program asks for the year of the car. That year is passed to the checkYear module and returns a value of true to the insurable variable, if the car is new enough.

4. The InsureProcess calls the printResults module passing it the insurable value (true or false) telling the user whether the car can be insured.

5. The cleanUp module thanks the user for using the program and at that time the program exits.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: If the return value of insurable in the insureprocess
Reference No:- TGS01108598

Now Priced at $35 (50% Discount)

Recommended (96%)

Rated (4.8/5)