Question: Old MathJax webview this is hackathon 3 // This program to oversee Hospital Billing System for patients #include #include using namespace std; // Function Prototypes

Old MathJax webview

Old MathJax webview this is hackathon 3 // This program to oversee

this is hackathon 3 // This program to oversee Hospital Billing System for patients #include #include using namespace std;

// Function Prototypes int getSurgeryType(); int getMedicationType(); int getOtherServices(); double hospitalStay (double); double getSurgeryCharges(int, double); double getPharmacyCharges (int, double); double getServiceCharges (int, double); void patientBill(double, double, double, double);

// Main Function int main() { int surgeryType; // To hold the type of surgery int medicationType; // To hold the type of medication int otherServices; // To hold the another type of service double surgeryCharges; double pharmacyCharges; double serviceCharges; double stayCharges; double price = 0; cout

// Function Definition

//*********************************************** // Function getSurgeryType * // Displays a menu of surgery types and gets * // a selection from the user. The selection * // is returned. * //*********************************************** int getSurgeryType() { int choice; // Display the surgery menu cout Choose a type of Surgery (1-5): "; cin >> choice; while (choice 5) { cout Legal values are 1-5. Please re-enter Surgery type: "; cin >> choice; } return choice; }

int getMedicationType() { int choice; // Display the medication menu cout Choose a type of Medication (1-5): "; cin >> choice; while (choice 5) { cout Legal values are 1-5. Please re-enter Medication type: "; cin >> choice; } return choice; }

int getOtherServices() { int choice; // Display the other services menu cout Choose a type of Services (1-3): "; cin >> choice; while (choice 3) { cout Legal values are 1-3. Please re-enter Services type: "; cin >> choice; } return choice; }

double hospitalStay (double dailyRate) { int days; int choice; double roomCharges; // Get the number of days in the hospital. cout How many days was the patient in the hospital? : "; cin >> days; // Display the room types menu cout Choose a type of room (1-3): "; cin >> choice; if (choice == 1) { // First Class (1 person) roomCharges = 250; } else if (choice == 2) { // Second Class (2 people) roomCharges = 150; } else { // Third Class (General Ward) roomCharges = 50; } // Food Charges const double foodCost = 50.00; // Update charges. dailyRate = (days * roomCharges) + (days * foodCost); return dailyRate; }

double getSurgeryCharges (int type, double price) { // double price; if (type ==1) { price = 100.00; } else if (type ==2) { price = 200.00; } else if (type ==3) { price = 300.00; } else if (type ==4) { price = 400.00; } else if (type ==5) { price = 500.00; } return price; }

double getPharmacyCharges (int type, double price) { // double price; if (type ==1) { price = 10.00; } else if (type ==2) { price = 20.00; } else if (type ==3) { price = 30.00; } else if (type ==4) { price = 40.00; } else if (type ==5) { price = 50.00; } return price; }

double getServiceCharges (int type, double totalServiceCharges) { int freq; double price; cout How long or times the patient did the selected service above? : "; cin >> freq; if (type ==1) { price = 100.00; } else if (type ==2) { price = 200.00; } else if (type ==3) { price = 40.00; } totalServiceCharges = price * freq; return totalServiceCharges; }

void patientBill (double hospitalStay, double surgeryCharges, double pharmacyCharges, double serviceCharges) { double total; // Display the patient bill cout

requirements

Hospital Billing System for patients #include #include using namespace std; // Function

Prototypes int getSurgeryType(); int getMedicationType(); int getOtherServices(); double hospitalStay (double); double getSurgeryCharges(int,

double); double getPharmacyCharges (int, double); double getServiceCharges (int, double); void patientBill(double, double,

double, double); // Main Function int main() { int surgeryType; // To

Hospital Billing System version 2.0 Your group are asked to upgrade the hospital billing system in that small private hospital by allowing the system to process the bills for many patients during their check out from the hospital using functions, arrays (parallel 1-D or 2-D), and pointers (optional). Assume the process is done on one specific day. The requirements are the same as in hackathon 3, with the following additional processing: Able to generate each category charges and total charges for each patient. Able to calculate the total charges for all patients. Able to generate the total charges for each category (hospital stay, surgery, medication, service) for all patients. Able to compute the average hospital stay for a patient. Able to find the patient's name that pays the highest bill. Able to find the patient's name that pays the lowest bill. Note: Input/Output data can be done interactively (like previous system) or using input/output text files (optional) with clear descriptions of the contents. You program must have the following features: i. Interactive, easy navigation, and user-friendly menu for input Meaningful comments in the source codes ii. Informative display for output . Your documentation needs to have: i. The details of the report in the cover: Course: Assignment: Session: Date: Group Number: Member List: Lecturer's Name: CPT111 Hackathon 4 Sem 1 2021/2022 22 January 2022 Members full name (Matric Number)> Pn Maziani Sabudin . Table of Content Description of the question requirements a. Analysis of the problem b. Identify the specification of the requirements which include inputs, outputs, process, and your own constraints and assumptions iv. V. The code Text files (1/0) - optional Sample of cases tested on your program (use print screen with clear print) vi, 1 Restriction for this Hackathon 4: You must not use global variable except for constant. You must not use , , , , , and any other preprocessor never used before during your lab session. You may use all the directives in your programme's pre-processor which you have been exposed to during your class and lab sessions. // Display the surgery menu cout Choose a type of Surgery (1-5): "; cin >> choice; // Display the medication menu cout Choose a type of Medication (1-5): "; cin >> choice; cout Choose a type of room (1-3): "; cin >> choice

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!