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 14:30
Complete the sentence based on your knowledge of the professional difficulties faced by music artists. digital technology allows audiences to see free live telecasts of music or dance performances through
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
Answers: 3
question
Computers and Technology, 23.06.2019 20:40
On nba 2k 19, every time i try to join a my park game, it leads ro a website telling my dad that he needs ps plus. i already have ps plus though. how do i fix this?
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
Asecurity policy is a a. set of guidlines b. set of transmission protocols c. written document d. set of rules based on standards and guidelines
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, 27.02.2021 22:00
question
Physics, 27.02.2021 22:00
question
Chemistry, 27.02.2021 22:00
question
Mathematics, 27.02.2021 22:00
question
Mathematics, 27.02.2021 22:00
question
Mathematics, 27.02.2021 22:00
Questions on the website: 13722363