Hospital Problem Pre SBT 2 Test (Aggregation & Inheretence)

Question:

An IT company has been awarded a project by a local hospital to develop a simple version of patient management system. The purpose of the system is to record patients that are hospitalized in the hospital. The records include the information of the patient, the doctor in-charged for the patient, and the ward that the patient is staying.

You are a member of a software development team in the company and your team has been assigned to run the project. Your team leader who is also the system analyst for the project has done the requirement analysis and came out with the following design and specifications.
Specifications:
The following specifications describe the detail of the above design and other requirements to comply with.

Program
 • The program needs to be written in C++ language and implements the object-oriented programming concept of aggregations and inheritances. 

Class Implementation
• Implement all the classes using inline approach. . Member Variables
• Specify the member variable of the base class so that it is accessible by the derived classes.
• Specify the member variables of all the classes so that they are inaccessible by the objects of the classes. 

Member Functions
• Implement all the constructors of the classes such that they initialize the member variables of the classes with empty strings. (Default constructor)
• Determine and specify each of the member functions of the classes whether they should be read-only.
 • Implement the concept of redefining and overloading for the method print where appropriate. The following table describes the output that should be produced by each of the methods print

The main function
• Declare an array to hold a list of patients.
• Using an appropriate loop, fill in each patient in the array with related data entered from the keyboard. The user firstly needs to enter the number of patients. 
• Using another loop, list the information of all the patients.
• The following figures illustrate examples of user input and the corresponding output when the program runs. Note that the bold texts indicate input from the user.
 the output must be like this
Solution

Post a Comment

0 Comments