Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

How would you handle this situation?

Answered: 1 week ago

Question

Create a Fishbone diagram with the problem being coal "mine safety

Answered: 1 week ago