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, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
question
Computers and Technology, 23.06.2019 22:00
Jackson, who works in the finance department of a company, is holding a seminar for other employees on how to file taxes. only three employees sign up to attend the seminar. which device can he use to share his presentation with a group of three employees?
Answers: 1
question
Computers and Technology, 24.06.2019 11:20
Colby works as a shipping clerk for a major package delivery service. some of his daily tasks include tracking shipments and entering orders. which aspect of the information technology cluster would he most likely be trained in? a.networkingb.databasesc.hardwared.software
Answers: 2
question
Computers and Technology, 24.06.2019 16:00
Read these lines from beowulf.often scyld scefing seized mead-benches from enemytroops, from many a clan, he terrified warriors, even thoughfirst he was found a waif, best explains why the author includes this information in theexposition? a. to emphasize that a hero must learn to be fierceb. to remember the famous story of a popular heroc. to express sadness about losing the old heroesd. to see whether people still respect the old heroes
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
World Languages, 17.10.2020 01:01
question
Mathematics, 17.10.2020 01:01
question
Mathematics, 17.10.2020 01:01
Questions on the website: 13722363