Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I would likw this program in c++ with comments in every step . Thank you. Step 1. Input Ask how many medical supply applications were

I would likw this program in c++ with comments in every step . Thank you.

Step 1. Input

Ask how many medical supply applications were used (can be zero through a maximum of 5).

Ask the user for the ambulance charge amount (can be zero through 500 maximum).

Ask the user for the billing information (the 5 byte numeric medical provider code).

Validate the entries to be numeric and good (greater than 0).

Step 2. Cost of admission

Average room admissions cost is USD $450.00.

Average cost of Hospital Services USD $100.00.

Taxes and surcharges:

Federal tax is 6% on both the room and the ambulance.

Medical Staff Unions fee is 8% on the subtotal of the pre-tax amount.

EMS surcharge on ambulance usage to the hospital is 10% (the hospital will directly bill the patients).

Medical supply prices vary but well assume $24 per application. Once a medical bag/kit is opened, the patient incurs the entire charge no matter what is used.

Assume all of the new patients are of the inpatient variety.

Step 3. Output

Calculate and output as an itemized bill:

For ambulance arrival, pre-tax cost of the ambulance;

The pre-tax cost of the Hospital Services;

Total cost of medical supplies/applications;

The pre-tax cost of room admissions;

Total pre-tax bill (subtotal);

Federal tax for ambulance and room ( both);

Medical staff union fees in dollars;

EMS charge in dollars;

Total bill in dollars.

For example, if the patient admitted used 1 medical supply, your output should look precisely like this:

---------------------------------

New patient

CS1 Hospital

---------------------------------

Ambulance $ 300.00

Room $ 450.00

Hospital Services $ 100.00

Medical supplies $ 24.00

------

Subtotal $ 874.00

Fed tax $ 45.00

Union charges $ 69.92

EMS charges $ 30.00

------

Total $ 1,018.92

Medical provider: xxxxx

Step 4. Repeat

This program must repeat (up to 10 times), taking new input for new entries. Therefore, after each output has been displayed your program will start again by asking for another entry. If the number of times repeated is more than 10, display a message and promptly exit. Each time before asking for new input again, the screen must scroll (roll off). You can do this in a variety of ways, however, dont forget to pause the screen so the user can review the report prior to starting again. Leave an option for the user to exit (no more entries). Do this by using a sentinel.

Program and submission details:

Your input and output should match the example.

Always rigorously test your code and manually check your results to see if they are correct.

Use a header comment with your name and the description of the program.

Use pre and post condition comments for each function.

Use prototypes for the functions (pre & post comments go with them).

Include all your functions at the end of the program.

Use appropriate code comments.

Use appropriate variable names.

Use constants where appropriate.

Use good coding practices (i.e., spacing, indentation, etc.).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions