subject

Write a c++ program in which ypu are required to define a
classnamed "citizen" .
the class must include thefollowing two data members
//data member for
citizenname
1: name
//data member for
citizennatioanlity
2: nationality
your program should define three constructors for the
class"citizen"
1) a constructor with "noparameters"
2) a constructor with "twoparameters"
(name, nationality)
3) a "copyconstructor"
all of these three constrcutors are meant to initialize
theirrespective objects. in case of copy constructor, you are
requiredto assign 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 of constructor) in the "main"function
write a function in class "citizen" to
display the initialized datamembers for each object.
also write "destructor"for the
class "citizen" .
dispaly a message that says"destructorcalled"
in the destructor body.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Describir textbook icon_person mira los dibujos y describe lo que está pasando. usa los verbos de la lista.
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
Where can page numbers appear? check all that apply. in the header inside tables in the footer at the bottom of columns at the top of columns
Answers: 1
question
Computers and Technology, 25.06.2019 07:30
Which behavior demonstrates teamwork
Answers: 1
You know the right answer?
Write a c++ program in which ypu are required to define a
classnamed "citizen" .
the cla...
Questions
question
Mathematics, 20.10.2019 21:10
question
Mathematics, 20.10.2019 21:10
Questions on the website: 13722359