SlideShare a Scribd company logo
3. To store person profiles, create a class called person with the data members name and age
using appropriate constructor and destructor. Also, ensure that when a person object is destroyed,
a message is printed indicating that the object has been destroyed. Create 3 person profiles and
display their details. While displaying the details, if the age of the person is more than 21 , print the
person is a major. Write a C++ program with at least one sample input with age above 21 years.

More Related Content

More from naslin841216

include ltfunctionalgt include ltiteratorgt inclu.pdf
include ltfunctionalgt include ltiteratorgt inclu.pdfinclude ltfunctionalgt include ltiteratorgt inclu.pdf
include ltfunctionalgt include ltiteratorgt inclu.pdf
naslin841216
 
need on c++ Task 1 Design a class for Singly linked List wi.pdf
need on c++ Task 1 Design a class for Singly linked List wi.pdfneed on c++ Task 1 Design a class for Singly linked List wi.pdf
need on c++ Task 1 Design a class for Singly linked List wi.pdf
naslin841216
 
As of 2010 Xerox Corporation NYSE XRX is a 22 billion .pdf
As of 2010 Xerox Corporation NYSE XRX is a 22 billion .pdfAs of 2010 Xerox Corporation NYSE XRX is a 22 billion .pdf
As of 2010 Xerox Corporation NYSE XRX is a 22 billion .pdf
naslin841216
 
ACCT 215 CT Accounting Cycle Problem The John Marshall Com.pdf
ACCT 215 CT Accounting Cycle Problem The John Marshall Com.pdfACCT 215 CT Accounting Cycle Problem The John Marshall Com.pdf
ACCT 215 CT Accounting Cycle Problem The John Marshall Com.pdf
naslin841216
 
El caso Una maana de lunes a viernes en 2007 Bethanye Blo.pdf
El caso  Una maana de lunes a viernes en 2007 Bethanye Blo.pdfEl caso  Una maana de lunes a viernes en 2007 Bethanye Blo.pdf
El caso Una maana de lunes a viernes en 2007 Bethanye Blo.pdf
naslin841216
 
72Tyrone works for a financial services provider He is tol.pdf
72Tyrone works for a financial services provider He is tol.pdf72Tyrone works for a financial services provider He is tol.pdf
72Tyrone works for a financial services provider He is tol.pdf
naslin841216
 

More from naslin841216 (20)

On average indoor cats live to 12 years old with a standard.pdf
On average indoor cats live to 12 years old with a standard.pdfOn average indoor cats live to 12 years old with a standard.pdf
On average indoor cats live to 12 years old with a standard.pdf
 
include ltfunctionalgt include ltiteratorgt inclu.pdf
include ltfunctionalgt include ltiteratorgt inclu.pdfinclude ltfunctionalgt include ltiteratorgt inclu.pdf
include ltfunctionalgt include ltiteratorgt inclu.pdf
 
Grace makes sure that she walks by her bosss office several.pdf
Grace makes sure that she walks by her bosss office several.pdfGrace makes sure that she walks by her bosss office several.pdf
Grace makes sure that she walks by her bosss office several.pdf
 
Conversion of G3P to RuBP energy and it is coupled to releas.pdf
Conversion of G3P to RuBP energy and it is coupled to releas.pdfConversion of G3P to RuBP energy and it is coupled to releas.pdf
Conversion of G3P to RuBP energy and it is coupled to releas.pdf
 
need on c++ Task 1 Design a class for Singly linked List wi.pdf
need on c++ Task 1 Design a class for Singly linked List wi.pdfneed on c++ Task 1 Design a class for Singly linked List wi.pdf
need on c++ Task 1 Design a class for Singly linked List wi.pdf
 
In the test of hypotheses about three or more population mea.pdf
In the test of hypotheses about three or more population mea.pdfIn the test of hypotheses about three or more population mea.pdf
In the test of hypotheses about three or more population mea.pdf
 
During the current year Brewer Company acquired all of the .pdf
During the current year Brewer Company acquired all of the .pdfDuring the current year Brewer Company acquired all of the .pdf
During the current year Brewer Company acquired all of the .pdf
 
ii If the second segment is lost what is the acknowledgeme.pdf
ii If the second segment is lost what is the acknowledgeme.pdfii If the second segment is lost what is the acknowledgeme.pdf
ii If the second segment is lost what is the acknowledgeme.pdf
 
Given the matrices B132122Fpath dM403 1759 V84 H666 .pdf
Given the matrices B132122Fpath dM403 1759 V84 H666 .pdfGiven the matrices B132122Fpath dM403 1759 V84 H666 .pdf
Given the matrices B132122Fpath dM403 1759 V84 H666 .pdf
 
Destruction results in loss of communication between the R a.pdf
Destruction results in loss of communication between the R a.pdfDestruction results in loss of communication between the R a.pdf
Destruction results in loss of communication between the R a.pdf
 
As of 2010 Xerox Corporation NYSE XRX is a 22 billion .pdf
As of 2010 Xerox Corporation NYSE XRX is a 22 billion .pdfAs of 2010 Xerox Corporation NYSE XRX is a 22 billion .pdf
As of 2010 Xerox Corporation NYSE XRX is a 22 billion .pdf
 
ACCT 215 CT Accounting Cycle Problem The John Marshall Com.pdf
ACCT 215 CT Accounting Cycle Problem The John Marshall Com.pdfACCT 215 CT Accounting Cycle Problem The John Marshall Com.pdf
ACCT 215 CT Accounting Cycle Problem The John Marshall Com.pdf
 
El caso Una maana de lunes a viernes en 2007 Bethanye Blo.pdf
El caso  Una maana de lunes a viernes en 2007 Bethanye Blo.pdfEl caso  Una maana de lunes a viernes en 2007 Bethanye Blo.pdf
El caso Una maana de lunes a viernes en 2007 Bethanye Blo.pdf
 
72Tyrone works for a financial services provider He is tol.pdf
72Tyrone works for a financial services provider He is tol.pdf72Tyrone works for a financial services provider He is tol.pdf
72Tyrone works for a financial services provider He is tol.pdf
 
Anna estimates that her investment strategy will pay her 12.pdf
Anna estimates that her investment strategy will pay her 12.pdfAnna estimates that her investment strategy will pay her 12.pdf
Anna estimates that her investment strategy will pay her 12.pdf
 
Answer questions for 3133 and 3141 3133 Separate user .pdf
Answer questions for 3133 and 3141 3133 Separate user .pdfAnswer questions for 3133 and 3141 3133 Separate user .pdf
Answer questions for 3133 and 3141 3133 Separate user .pdf
 
Consider the following C++ program and rewrite the output fu.pdf
Consider the following C++ program and rewrite the output fu.pdfConsider the following C++ program and rewrite the output fu.pdf
Consider the following C++ program and rewrite the output fu.pdf
 
Can someone please help me with this question thank you.pdf
 Can someone please help me with this question thank you.pdf Can someone please help me with this question thank you.pdf
Can someone please help me with this question thank you.pdf
 
105 On January 2 2025 Hanson Leasing Company leases equip.pdf
105 On January 2 2025 Hanson Leasing Company leases equip.pdf105 On January 2 2025 Hanson Leasing Company leases equip.pdf
105 On January 2 2025 Hanson Leasing Company leases equip.pdf
 
1 What type of sedimentary rock would most likely form from.pdf
1 What type of sedimentary rock would most likely form from.pdf1 What type of sedimentary rock would most likely form from.pdf
1 What type of sedimentary rock would most likely form from.pdf
 

Recently uploaded

Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
YibeltalNibretu
 

Recently uploaded (20)

Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 

3 To store person profiles create a class called person wi.pdf

  • 1. 3. To store person profiles, create a class called person with the data members name and age using appropriate constructor and destructor. Also, ensure that when a person object is destroyed, a message is printed indicating that the object has been destroyed. Create 3 person profiles and display their details. While displaying the details, if the age of the person is more than 21 , print the person is a major. Write a C++ program with at least one sample input with age above 21 years.