Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You have been hired as Programmer in a SoftwareDevelopment Company XYZ. Company

ID: 3618482 • Letter: Y

Question

You have been hired as Programmer in a SoftwareDevelopment Company XYZ. Company asks you to develop HealthManagement System of a Hospital. At the moment you are required todevelop the system with following functionalities.

Patient Registration

Doctors Registration

Billing for Patient

Write a C++ program in which you are required to definea class named Citizen. The class must include thefollowing two data members.

// data member for Citizen Name

1: Name

//data member for Citizen Nationality

2: Nationality

Your Program should define three constructors for the classCitizen

1: a constructor with no parameter

2: a constructor with two parameters (name,nationality)

3: a copy constructor

All of these three constructors are meant to initialize theirrespective objects. Incase of copy constructor, you are required toassign a separate space for the data members of the new objectwhile copying the values of previously existed object.

Declare three objects (1 for each type ofconstructor) in main.

Write a function in class Citizen to displaythe initialized data members for each object.

Also write destructor for the classCitizen. Display a message that says“destructor called” in the destructorbody.

Note:- Make use of comments in source code where you useconstructors , objects, copy constructors anddestructors.

Explanation / Answer

please rate - thanks #include using namespace std; class Citizen{       private:          string name;          stringnationality; public:         Citizen(string n,stringnat)           {name=n;           nationality=nat;            }         Citizen()           {name="name";           nationality="nation";            }          Citizen(constCitizen &n)            {name=n.name;            nationality=n.nationality;            }        void display()           {cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote