Modify exercise 7a so that the second method calls one of


a. Plan the logic for an insurance company's premium determining program. The program calls a method that prompts the user for the type of policy needed-health or auto. Pass the user's response to a second method, where the premium is set-$250 for a health policy or $175 for an auto policy. Pass the premium amount to a third method for display.

b. Modify Exercise 7a. so that the second method calls one of two additional methods-one that determines the health premium or one that determines the auto premium. The health insurance method asks users whether they smoke; the premium is $250 for smokers and $190 for nonsmokers.

Th e auto insurance method asks users to enter the number of traffic tickets they have received in the last three years. Th e premium is $175 for those with three or more tickets, $140 for those with one or two tickets, and $95 for those with no tickets. Each of these two methods returns the premium amount to the second method, which sends the premium amount to the display method.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Modify exercise 7a so that the second method calls one of
Reference No:- TGS01474397

Expected delivery within 24 Hours