subject

(Hospital Class) Write a c++ class called 'Hospital' with Data Members: hospital name -string type- //store the name of the hospital Number of beds - integer type- //store number of beds in the hospital number of patient - integer type- // number of patients, consider each patient need one bed, if the hospital has 15 beds then no more than 15 patients Member Functions: Hospital(name, beds, patients) // Constructor to initilize data members addPatient() //to add one patient to number of patients currently in the hospital, just increment number of patient by 1 removePatient() //to remove one patient from number of patients currently in the hospital, just subtract one from number of patients displayInfo() // which just show information about the hospital: hospital name, number of beds, number of patients. Create a program that creates at least three Hospital objects or array of Hospital objects and tests the member functions of class Hospital. Note:- 1- when you add a patient it should not exceed the number of beds. If so, display an error message indicating that the hospital is full. 2- number of beds and number of patients should not be negative, if so, display and error message and set it to 0. 3- when you remove a patient and there is no patient, display an error message.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:30
At an open or uncontrolled intersection, yield if a. your road is paved and the crossroad is not b. the cross road is paved and yours is not c. you have two or more passengers in your vehicle d. you did not yield in the last intersection
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Which computer network component connects two different networks together and allows them to communicate? a is a node (or a device) that connects two different networks together and allows them to communicate.
Answers: 1
question
Computers and Technology, 24.06.2019 16:30
What is the item which could be matched with a statement below? software installed on a computer that produces pop-up ads using your browser an example of social engineering malware loads itself before the os boot is complete type of spyware that tracks your keystrokes, including passwords windows key + l the practice of tricking people into giving out private information or allowing unsafe programs into the network or computer when someone who is unauthorized follows the employee through a secured entrance to a room or building a type of malware that tricks you into opening it by substituting itself for a legitimate program a computer that has been hacked, and the hacker is using the computer to run repetitive software in the background without the user's knowledge an infestation designed to copy itself repeatedly to memory, on drive space, or on a network
Answers: 1
question
Computers and Technology, 25.06.2019 10:00
Aline ab is in 1st quadrant , its ends a and b respectively are 20mm and 60mm infront of vp respectively . the distance between the end projectors is 75 mm . the line is inclined at 30 degrees to the hp and end a 20 degrees above the hp . draw its projections , find true length
Answers: 2
You know the right answer?
(Hospital Class) Write a c++ class called 'Hospital' with Data Members: hospital name -string type-...
Questions
question
Mathematics, 02.12.2019 18:31
Questions on the website: 13722363