Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Problem

a. Plan the logic for an insurance company program to determine policy premiums. The program continuously prompts the user for an insurance policy number. When the user enters an appropriate sentinel value, end the program. Call a method that prompts each user for the type of policy needed-health or auto. While the user's response does not indicate health or auto, continue to prompt the user. When the value is valid, return it from the method. Pass the user's response to a new method where the premium is set and returned-$250 for a health policy or $175 for an auto policy. Display the results for each policy.

b. Modify Exercise 9a so that the premium-setting 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. The auto insurance method asks users to enter the number of traffic tickets they have received in the last three years. The premium is $175 for drivers 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 calling method, which returns the amount to be displayed.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92681502

Have any Question?


Related Questions in Computer Engineering

A 1000 utility bond with 14 years remaining before maturity

A $1000 utility bond with 14 years remaining before maturity can now be purchased for $760. It pays interest of $20 each 6-month period. What rate of return is earned by purchasing the bond at the current market price pl ...

Question you are to write a report on the malware assigned

Question: You are to write a report on the malware assigned to you in the "Week 6 Malware assignment by individual student" document. Your report, written in Microsoft Word with 12 point type and 1 in margins, must have ...

The freemont automobile factory has discovered that the

The Freemont Automobile Factory has discovered that the longer a worker has been on the job, the more parts the worker can produce. I need help finding an application that computes and displays a worker's anticipated out ...

Task working with arrays in matlabnbspcreate a matlab

Task : Working with Arrays in MatLab  Create a MatLab script called a2taski.m that computes the following tasks. The answers will appear in the Workspace. To view the larger structures, e.g., matrix A in Part 1 double cl ...

Question lessons learned from the mirai botnet attack of

Question: Lessons learned from the Mirai Botnet attack of 2016 • Why was it so much more effective than previous BotNet designs? • What kind of mitigations would you recommend for protection? These two points must be ans ...

Determine whether or not the following claim is true for

Determine whether or not the following claim is true for all regular expressions r 1  and r 2 . The symbol ≡ stands for equivalence regular expressions in the sense that both expressions denote the same language.  (a) (r ...

On the below question how did they decided the two

On the below question, how did they decided the two probabilities of guessing the correct and wrong answer on a question? Where did the 0.25 and 0.75 come from? The probability of achieving exactly  k  successes in  n  t ...

Question suppose that the coins of the fictional country of

Question : Suppose that the coins of the fictional country of Combinatoria come in the de- nominations, d1, d2, . . . , dk, where d1 = 1 and the other di values form a set of distinct integers greater than 1. Given an in ...

The current price of dumbas common stock is 25 per share

The current price of DUMBA's common stock is $25 per share. You plan on buying it today, holding it for 4 years, and then selling it. You anticipate receiving a dividend per share of $1.00 one year from today, $2.00 two ...

A group of students made the following scores on a 10-item

A group of students made the following scores on a 10-item quiz in psychological statistics: {5, 6, 7, 7, 7, 8, 8, 9, 9, 10, 10} What is the variance, treating these scores as a sample?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As