Insurance Program

 

Overview: 

 

You work for a health insurance company.  Every time someone goes to the doctor, they have to file a claim so that your insurance company will pay for some of their medical expenses.  However, your company doesn’t pay for all of their expenses.  The customer must pay the first $50 of every bill (this is called a deductible).  After that, your company pays 90% of whatever is left and they pay the other 10% of what is left. 

 

Example: 

 

Sally goes to the doctor and it costs $140 dollars.  She must pay the first $50, so this leaves $90 left over.  Your company pays 90% of the $90 and she pays the other 10%.  Therefore, your company pays $81 and she pays the other $9 (of the $90).  In the end, your company pays $81 and she pays $59.

 

Task: 

 

Write a program that will help you to process claims.  The program should ask you for the claimants ID# and the total bill. Validate data to make sure that strange amounts (like negative bills) are not entered.  After processing, the program should tell you the name, total bill, benefit amount, and co-pay amount.

 

Example:

Claimant ID#?  123456

Total Bill?  140.00

 

ID#

Total Bill

Benefit Amount

Co-Pay

123456

$140.00

$81.00

$59.00

 

Specifics: