Question: In C++ ! Also need a code screenshot :) For this assignment you're to write a program that calculates a dental bill. The first thing

In C++ ! Also need a code screenshot :)

In C++ ! Also need a code screenshot :) For this assignment

For this assignment you're to write a program that calculates a dental bill. The first thing your program will have to do is ask if the patient is a member or non-member of a dental plan. If the patient is a member, you should then prompt the user for an account number. This number will be forwarded to the GetCopayment function, which will examine the account number and to return the correct copayment value. How will GetCopayment determine what to do with the account number? Well, first of all the account number is limited to a six-digit number; so anything other than a six-digit number means an invalid account number has been provided, and in this case GetCopayment should return an invalid value so the caller will know about it (a return value of negative one should work). Otherwise the GetCopayment function will return $15.00 if the account number is between 100000 and 399999, $10.00 if the account number is between 400000 and 699999, and $5.00 if the account number is between 700000 and 999999. If the caller receives an invalid value from GetCopayment, an error message should be displayed indicating that the patient appears to have a problem with their account. Else, the user will then be prompted for the amount for additional services. The additional services charge and the copayment amount will be passed to the CalcTotal function, which will add the two values together. But before returning the result to the caller, it is first discounted by 8% (after all, this is a member's bill, so they've got to get some benefit, right?). But what if the user indicates that the patient is not a member of the dental plan? Then the user will be prompted to enter charges for the X-rays, cleaning and any extra; charges. These values will be passed to the CalcTotal function so that their sum will be calculated and returned to the caller, but not before adding a 12% surcharge! In case you haven't noticed yet, this program will contain two functions called CalcTotal

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!