Question: I need this in C++ please . . . You have been hired by the administration of a hospital system that seeks to improve its
I need this in C++ please


. . . You have been hired by the administration of a hospital system that seeks to improve its handling of patient charges. Your task is to write a program to calculate a patient's total charges after being treated. The program should first ask if the patient was admitted as an inpatient or an outpatient. Make sure the user is restricted to those two choices; if the user selects an incorrect choice, your program should prompt the user to enter a correct choice (implement this routine inside main()). If the patient was an inpatient, the following data should be entered: The number of days spent in the hospital The daily room rate Charges for hospital services (food, lab tests, etc.) Medication charges If the patient was an outpatient, the following data should be entered: Charges for hospital services (food, lab tests, etc.) Medication charges Use a single, separate function validateUser Input () to check that none of the data entered by the user is less than zero. If any of the inputs is less than zero, this function should prompt the user to reenter the data before returning to the main program. Once all data has been entered and validated, the program should use two overloaded functions calcTotalCharges() to calculate the patient's total charges. One of the functions should calculate the total charges for inpatients, the other function should calculate the total charges for outpatients. . : Sample Run This program will calculate a patient's hospital charges. Enter I for in-patient or o for out-patient: I Number of days in the hospital: 3 Daily room rate ($): 120.0 Lab fees and other service charges ($): 125 Medication charges ($): 59.99 Your total hospital bills is $544.99 O O 5 files: hospitalCharges.cpp (this one includes main() calcTotalCharges.cpp calcTotalCharges.h validateUserinput.cpp validateUserinput.h o 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
