Group Project
19. Patient Fees
This
• One or more students may work on a single class.
• The requirements of the program should be analyzed so each student is given about the same workload.
• The names, parameters, and return types of each function and class member function should be decided in advance.
• The program will be best implemented as a multifile program.
Write a program that computes a patient's bill for a hospital stay. The different components of the program are
• 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 types of surgery. It can update the charges variable of the PatientAccount class.
• The Pharmacy class will have stored within it the price of at least five types of medication. It can update the charges variable of the PatientAccount class.
• The main program.
The student who designs the main program will design a menu that allows the user to enter a type of surgery, enter one or more types of medication, and check the patient out of the hospital. When the patient checks out, the total charges should be displayed.
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
Starting Out with C++: Early Objects (9th Edition)
Additional Engineering Textbook Solutions
Starting Out with C++ from Control Structures to Objects (8th Edition)
Software Engineering (10th Edition)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Database Concepts (8th Edition)
Starting Out with Python (4th Edition)
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
- Please written by computer source Python asignment For this assignment you are to implement a program that computes the salaries for a set of employees. The program should begin by asking the user if there is an employee for which a salary is to be computed. If the user responds in the affirmative by inputting “yes” (in lowercase) the program should prompt the user to input the employee’s hourly pay rate and the number of hours worked by that employee. There should be a separate prompt for each of these two values. Once this data has been input, the program should compute the employee’s salary as the product of the hourly pay rate and the number of hours worked for the first 40 hours worked (i.e., straight time), plus time-and-a-half for those hours exceeding 40, and then output the result in a user-friendly format. Once the salary for the employee has been computed and output, the program should then ask the user if a salary should be computed for another employee. If again the user…arrow_forwardC++ Programmingarrow_forwardProgram Specifications Write a program to play an automated dice game that uses two dice (GVDie class provided). The player rolls both dice and either wins one credit, loses one credit, or sets a goal for future rolls. Current round ends when player wins or loses a credit. Game ends when credits are zero.Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.Step 0. Read starter template and do not change the provided code. Two GVDie objects are created. A random seed is read from input and passed to a die. This supports automated testing and creates predictable results that would otherwise be random. Starting credits is read from input. Step 1 . Roll both dice. Player wins one credit by rolling 7 or 11. Player losses one credit by rolling 2, 3, or 12. Otherwise, credits do not change and the player's goal is set to the dice total. The player's…arrow_forward
- BIRZEIT UNIVERSITY COMP242 – Project# 2 Buying/Selling Shares of Stocks Buying and selling shares of stocks of listed companies is a typical task to do among investors. Of course, this would result in a capital gain (or loss) when the shares are sold. This is computed as the difference between the shares' selling price and the price was originally paid to buy it. When an investor has a single share of stock, the process is easy. However, when (s)he sells multiple shares of stocks, bought over a period of time and possibly with different prices, the first step is to identify which shares of stocks are to be sold. There are two accounting principles (protocols) that are followed depends on the market of stocks: the shares bought last to be sold first, and the other is to sell the shares that stayed the longest. You are required to implement a program to calculate the possible capital gain/loss using these two protocols. This would facilitate the process for investors to know which market…arrow_forwardFruit Juice MachineIn this programming example, there are one function available which is main() class andstored in fruit.cpp. The program should do the following;1. Show the customer the different product sold by the juice machine.2. Let the customer make the selection.3. Show the customer the item selected.4. Accept money from customer.5. Release the item. Input – the selected item, quantity Output – the selected item and customer receipt. Question Execute the files by using Dev C++. Understand the flow of the program. Next, manipulate oradd appropriate functions in the existing files to: 1. Add coffee in the machine which has several types (minimum of 4 types). Allocates theprice and types for the customer. (Now, user can choose screen to buy juice or coffee.With each have different menu). 2. Show the customer the cost for each. 3. Let the customer choose more than one drink (iterate till the customer request to endchoosing the drink). 4. Prompt user to enter more money as long as…arrow_forwardDecription keyarrow_forward
- PROGRAMMING LANGUAGE: C++ ALSO PUT SCREENSHOTS WITH EVERY TASK. TASK 1 : A class of ten students took a quiz .The grades (integers are in range 0-100) for this quiz are available to you .Determine class average on quiz . TASK 2: Write c++ code that print summery of exam result and decide either student should have makeup class or not .If more then 30% of class fails in exam it’s mean they need a makeup class otherwise they don’t need any makeup class. For class strength take input from user (Hint: take two variables pass and fail) TASK 3: write a c++ that will determine whether a department-store customer has exceeded the credit limit on the charge account .For each customer , following facts are available : Account number (an integer) Balance at beginning of month Total of all items charged by this customer this month Total of all credit applied to this customer’s account this month. Allowed credit limit You are required to use a while structure to input each of these facts ,…arrow_forwardC++ beginnerarrow_forwardPlease help me in c++ languagearrow_forward
- Student Registration System is an approach that enables colleges and universities to better supervise a growing number of enrollments. Create a menu system for registration program in c++ that asking an input based on the choices below. If the input is A then the program will ask for name and program (course) store in two arrays, if B then the program will display all the data stored on the array and the program will be terminated only if the input is E. Apply also function on the program: Menu System – 1st Way of Function Add Student – 4th Way of Function Example: REGISTRATION SYSTEM: A - Add Student B - View ALL E - Exit Choose: A Name: John Lloyd Program: CpE REGISTRATION SYSTEM: A - Add Student B - View ALL E - Exit Choose: B Name Program…arrow_forwardtrue false void ffx() is a function with no return value void ffx() is a function with no argument int ffx(char x) is a function with int return value int ffx(char *x) is a function with parameter passed by reference char ffx( int x) is a function with int return value int ffc(char &x) is a function with parameter passed by referencearrow_forwardWeighted Job Scheduling in C language only please Problem statement: You are given a list of jobs where each job has a start time, finish time, and the profit associated with that job, find the maximum profit subset of non-overlapping jobs. Problem description: The problem wants you to find the maximum profit that you can make after performing a certain number of jobs such that each job has a certain condition that you can start a job only if the start time of the current job is greater than the finish time of the previous job. You are required to develop some algorithm such that the job start time and the finish time does not coincide with other jobs. Output: (Attached photo)arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education