Question
C++
Assignment 8, Chapter 5 Write a program that computes and displays the charges for a patients hospital stay. First, the program should ask ifthe patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered: 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 outpatient, the following data should be entered: .Charges for hospital services (ab tests, etc) .Hospital medication charges Use a single, separate function to validate that no input is less than zero. Ifit is, it should be reentered before being returned. Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient data. Both functions should return the total charges Modify Program overloaded Hospital, to write the report it creates to a file. What to turn in: create a new folder on your desktop. Make the WORD file for question one and add it to that folder. Make a zip file for 2 question after you finished, and add it to that folder. Make a zip file of that folder andsubmit iton TITANium. Making a zip file: right click on the folder send to compressed
0 0
Add a comment Improve this question Transcribed image text
Answer #1

t indude Ciostreom tt include < crroth uging navee Sppee std, lFanction petboryls double medication) int nrojno dcuble totalroces Sclection och stay aent Sta Caso cout e pleage 3.dex the no ot dous spod d the Cod ePlease cipl Lend Cin medicat nfatitoted cnd Costs CLeb. medications system cpause), function ter indie double Costs Cind nunDats, duble γ alt Per Dad, double

Add a comment
Know the answer?
Add Answer to:
C++ Write a program that computes and displays the charges for a patient's hospital stay_First, the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a program that computes and displays the charges for a patient’s hospital stay. First, the...

    Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient, the following data should be entered: The number of days spent in the hospital The daily rate Hospital Medication Charges Charges for hospital services (labs, tests, etc.) The program should ask for the following data if the patient was an out-patient: Charges for hospital...

  • Python language please (also upload the result pic too) Write a program that computes and displays...

    Python language please (also upload the result pic too) Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient the following data should be entered: • 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...

  • Hospital Charges ASSIGNMENT: Write a program to calculate and display the amount of the charges for...

    Hospital Charges ASSIGNMENT: Write a program to calculate and display the amount of the charges for a hospital stay. Create a global constant for the daily fee of a hospital room ($350.00/day). Ask the user for: The number of days spent in the hospital The amount of the medication charges The amount of the surgical charges The amount of the lab fees The amount of the physical rehabilitation charges Then, using functions, calculate the stay charges (number of days *...

  • Problem: Patient Fees C++ You are to write a program that computes a patient’s bill for...

    Problem: Patient Fees C++ You are to write a program that computes a patient’s bill for a hospital stay. The different components of the program are The PatientAccount class The Surgery class The Pharmacy class The main program The PatientAccount class will keep a total of the patient’s charges. It will also keep track of the number of days spent in the hospital. The group must decide on the hospital’s daily rate. The Surgery class will have stored within it...

  • Write a python program that computes a patients bill for a hospital stay. The different components of the program are The patientAccount class The Surgery class The Pharmacy class The main program -Th...

    Write a python program that computes a patients bill for a hospital stay. The different components of the program are The patientAccount class The Surgery class The Pharmacy class The main program -The PatientAccount class will keep a total of the patient's charges. It will also keep track of the number of days spent in the hospital. The group must decide on the hospital's daily rate. -The Surgery class will have stored within it the charges for at least five...

  • To write a C++ program to find average of three integers using functions Objectives: To get...

    To write a C++ program to find average of three integers using functions Objectives: To get familiar with functions in C++ Task 1: Study the working of user-defined functions in C++ Task 2: To write a C++ program to find average of three integers using functions Programming Instructions: Make new project (Visual C++ Empty Project) named lab6 and add a C++ file named lab6.cpp to this project. (Some IDE may automatically generate main.cpp or source.cpp, then you just rename it...

  • Create an application that calculates the total cost of a hospital stay. The application should accept...

    Create an application that calculates the total cost of a hospital stay. The application should accept the following input: the number of days spent in the hospital (as an integer), the amount of medication charges, the amount of surgical charges, the amount of lab fees, and the amount of physical rehabilitation charges. The hospital charges $350 per day. Create the following functions. A. CalcStayCharges- Calculates and returns the base charges for the hospital stay. This is computed as $350 times...

  • (C++ Program) 1. Write a program to allow user enter an array of structures, with each...

    (C++ Program) 1. Write a program to allow user enter an array of structures, with each structure containing the firstname, lastname and the written test score of a driver. - Your program should use a DYNAMIC array to make sure user has enough storage to enter the data. - Once all the data being entered, you need to design a function to sort the data in descending order based on the test score. - Another function should be designed to...

  • please write in C++ Write a program that uses a structure to store the following inventory...

    please write in C++ Write a program that uses a structure to store the following inventory data in a file: The data can be either read from a text file or the keyboard Item name (string) Quantity on hand(int) Wholesale cost(double) Retail Cost(double) The program should have a menu that allows the user to perform the following tasks: Add new records to the file Display any record in the file User will provide the name of the item or the...

  • C++ program Write a C++ program to manage a hospital system, the system mainly uses file...

    C++ program Write a C++ program to manage a hospital system, the system mainly uses file handling to perform basic operations like how to add, edit, search, and delete record. Write the following functions: 1. hospital_menu: This function will display the following menu and prompt the user to enter her/his option. The system will keep showing the menu repeatedly until the user selects option 'e' from the menu. Arkansas Children Hospital a. Add new patient record b. Search record c....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT