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 20:00
The blank button automatically displays next to the data when you select a range of numeric data which is an available option for creating a chart
Answers: 3
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
What can you prevent issues related to downloading content form the internet
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, 18.11.2020 23:40
question
Mathematics, 18.11.2020 23:40
question
Mathematics, 18.11.2020 23:40
question
Mathematics, 18.11.2020 23:40
Questions on the website: 13722362