Question: You will be creating a program for this module Write a program that READs a file of charges for a patients hospital stay. The file
You will be creating a program for this module
Write a program that READs a file of charges for a patients hospital stay. The file contains two sets of records: Patients that were admitted as an in-patient(I) or an outpatient(O).
If the patient was an in-patient the following data should be used:
The number of days spent in the hospital
The daily rate Charges for hospital services (lab tests, etc.)
Hospital medication charges
If the patient was an out-patient the following data should be entered:
Charges for hospital services (lab tests, etc.)
Hospital medication charges
The program should use two overloaded functions to calculate the total charges for each type of patient and the total charges overall.
One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for outpatient data. Both functions should return the total charges for that patient
I Jones 55 2000.00 253.91
I User 25 1000.00 350.50
I Martin 15 3000.00 459.30
I bonjovi 100 2500.00 550.25
I Simon 32 4000.00 850.85
I Tree 5 9000.00 1450.95
O jackson 0 285.00 450.99
O bobby 0 390.00 450.99
I Jobby 14 6000.00 485.55
I Jones 8 1500.00 650.32
I Smith 12 6000.00 150.43
I Cheer 60 5000.00 950.65
O Bryan 0 2000.00 450.56
I Lala 45 10000.00 450.12
O Bobber 0 1500.00 450.77
O tank 0 200.00 450.56
O Peary 0 400.00 450.05
O Peachy 0 100.00 450.22
I Smitty 120 19000.00 290.99
I Swith 2 2500.00 180.34
I Nitty 7 3000.00 360.13
I Boa 60 12000.00 975.90
O Frenchy 0 350.00 450.30
I Newter 65 2000.00 485.55
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
