SlideShare ist ein Scribd-Unternehmen logo
1 von 1
I need reasonably brief, but complete answers for the following
few questions that I am stuck on.
1.a) Suppose class Y is derived from class X. Each class
declares
a constructor and a destructor. Class Y has a string member
object that has a constructor and destructor. In what order do
the three constructors and destructors run when instances of
class Y are created and destroyed?
b) Should X's destructor be declared virtual? Why or why
not,
and what difference would it make?
2. What is a pure virtual function? Why would you define a
pure
virtual function? Give an example of a pure virtual function.
3. What is an abstract base class? What does it do? Why would
you
make a class abstract?
4. What are the advantages of using an stl::string to hold
character
data vs. a dynamic char array?

Weitere ähnliche Inhalte

Mehr von heathmirella

I want a lab to be rephrased. Please ignore the calculations and num.docx
I want a lab to be rephrased. Please ignore the calculations and num.docxI want a lab to be rephrased. Please ignore the calculations and num.docx
I want a lab to be rephrased. Please ignore the calculations and num.docxheathmirella
 
I think that the title in Plato’s Cave is significant, because it pr.docx
I think that the title in Plato’s Cave is significant, because it pr.docxI think that the title in Plato’s Cave is significant, because it pr.docx
I think that the title in Plato’s Cave is significant, because it pr.docxheathmirella
 
i want somebody make for me please presentaton 5 slides storyThe Fro.docx
i want somebody make for me please presentaton 5 slides storyThe Fro.docxi want somebody make for me please presentaton 5 slides storyThe Fro.docx
i want somebody make for me please presentaton 5 slides storyThe Fro.docxheathmirella
 
I pledge allegiance to the Flag of the United States of America a.docx
I pledge allegiance to the Flag of the United States of America a.docxI pledge allegiance to the Flag of the United States of America a.docx
I pledge allegiance to the Flag of the United States of America a.docxheathmirella
 
I want one page and half which include 1- why do I like him and .docx
I want one page and half which include 1- why do I like him and .docxI want one page and half which include 1- why do I like him and .docx
I want one page and half which include 1- why do I like him and .docxheathmirella
 
I paid for someone else to do it, but they have not turned the assig.docx
I paid for someone else to do it, but they have not turned the assig.docxI paid for someone else to do it, but they have not turned the assig.docx
I paid for someone else to do it, but they have not turned the assig.docxheathmirella
 
I require a case study written on a public health issue. Total 7 pag.docx
I require a case study written on a public health issue. Total 7 pag.docxI require a case study written on a public health issue. Total 7 pag.docx
I require a case study written on a public health issue. Total 7 pag.docxheathmirella
 
I ran out of ideas to complete the work to make it a 2 page single l.docx
I ran out of ideas to complete the work to make it a 2 page single l.docxI ran out of ideas to complete the work to make it a 2 page single l.docx
I ran out of ideas to complete the work to make it a 2 page single l.docxheathmirella
 
I need two or three paragraphs include the Introduction proposed .docx
I need two or three paragraphs include the Introduction proposed .docxI need two or three paragraphs include the Introduction proposed .docx
I need two or three paragraphs include the Introduction proposed .docxheathmirella
 
I need two obituaries (minimum 250 words each) in remembrance of Pre.docx
I need two obituaries (minimum 250 words each) in remembrance of Pre.docxI need two obituaries (minimum 250 words each) in remembrance of Pre.docx
I need two obituaries (minimum 250 words each) in remembrance of Pre.docxheathmirella
 
I need to write the discussion about this article below Between 15.docx
I need to write the discussion about this article below Between 15.docxI need to write the discussion about this article below Between 15.docx
I need to write the discussion about this article below Between 15.docxheathmirella
 
I need to write an entry assignment for my english class. I need i.docx
I need to write an entry assignment for my english class. I need i.docxI need to write an entry assignment for my english class. I need i.docx
I need to write an entry assignment for my english class. I need i.docxheathmirella
 
I need to write a research argumentative essay. My topic is - .docx
I need to write a research argumentative essay. My topic is -  .docxI need to write a research argumentative essay. My topic is -  .docx
I need to write a research argumentative essay. My topic is - .docxheathmirella
 
I only need it to be 400 words or less and use the following  reso.docx
I only need it to be 400 words or less and use the following  reso.docxI only need it to be 400 words or less and use the following  reso.docx
I only need it to be 400 words or less and use the following  reso.docxheathmirella
 
i need you to read the informations below and then make a summary in.docx
i need you to read the informations below and then make a summary in.docxi need you to read the informations below and then make a summary in.docx
i need you to read the informations below and then make a summary in.docxheathmirella
 
i need you do expend that to 2000 words1  including WAWN  which .docx
i need you do expend that to 2000 words1  including WAWN  which .docxi need you do expend that to 2000 words1  including WAWN  which .docx
i need you do expend that to 2000 words1  including WAWN  which .docxheathmirella
 
i need you do expend that to 2000 words1  including WAWN  whic.docx
i need you do expend that to 2000 words1  including WAWN  whic.docxi need you do expend that to 2000 words1  including WAWN  whic.docx
i need you do expend that to 2000 words1  including WAWN  whic.docxheathmirella
 
I need you to answer these 3 questions each write around 200 words. .docx
I need you to answer these 3 questions each write around 200 words. .docxI need you to answer these 3 questions each write around 200 words. .docx
I need you to answer these 3 questions each write around 200 words. .docxheathmirella
 
i need to write a reflection paper onHIST 2010-016 Survey of Unite.docx
i need to write a reflection paper onHIST 2010-016 Survey of Unite.docxi need to write a reflection paper onHIST 2010-016 Survey of Unite.docx
i need to write a reflection paper onHIST 2010-016 Survey of Unite.docxheathmirella
 
I need to have presentation and Ill upload the details.super si.docx
I need to have presentation and Ill upload the details.super si.docxI need to have presentation and Ill upload the details.super si.docx
I need to have presentation and Ill upload the details.super si.docxheathmirella
 

Mehr von heathmirella (20)

I want a lab to be rephrased. Please ignore the calculations and num.docx
I want a lab to be rephrased. Please ignore the calculations and num.docxI want a lab to be rephrased. Please ignore the calculations and num.docx
I want a lab to be rephrased. Please ignore the calculations and num.docx
 
I think that the title in Plato’s Cave is significant, because it pr.docx
I think that the title in Plato’s Cave is significant, because it pr.docxI think that the title in Plato’s Cave is significant, because it pr.docx
I think that the title in Plato’s Cave is significant, because it pr.docx
 
i want somebody make for me please presentaton 5 slides storyThe Fro.docx
i want somebody make for me please presentaton 5 slides storyThe Fro.docxi want somebody make for me please presentaton 5 slides storyThe Fro.docx
i want somebody make for me please presentaton 5 slides storyThe Fro.docx
 
I pledge allegiance to the Flag of the United States of America a.docx
I pledge allegiance to the Flag of the United States of America a.docxI pledge allegiance to the Flag of the United States of America a.docx
I pledge allegiance to the Flag of the United States of America a.docx
 
I want one page and half which include 1- why do I like him and .docx
I want one page and half which include 1- why do I like him and .docxI want one page and half which include 1- why do I like him and .docx
I want one page and half which include 1- why do I like him and .docx
 
I paid for someone else to do it, but they have not turned the assig.docx
I paid for someone else to do it, but they have not turned the assig.docxI paid for someone else to do it, but they have not turned the assig.docx
I paid for someone else to do it, but they have not turned the assig.docx
 
I require a case study written on a public health issue. Total 7 pag.docx
I require a case study written on a public health issue. Total 7 pag.docxI require a case study written on a public health issue. Total 7 pag.docx
I require a case study written on a public health issue. Total 7 pag.docx
 
I ran out of ideas to complete the work to make it a 2 page single l.docx
I ran out of ideas to complete the work to make it a 2 page single l.docxI ran out of ideas to complete the work to make it a 2 page single l.docx
I ran out of ideas to complete the work to make it a 2 page single l.docx
 
I need two or three paragraphs include the Introduction proposed .docx
I need two or three paragraphs include the Introduction proposed .docxI need two or three paragraphs include the Introduction proposed .docx
I need two or three paragraphs include the Introduction proposed .docx
 
I need two obituaries (minimum 250 words each) in remembrance of Pre.docx
I need two obituaries (minimum 250 words each) in remembrance of Pre.docxI need two obituaries (minimum 250 words each) in remembrance of Pre.docx
I need two obituaries (minimum 250 words each) in remembrance of Pre.docx
 
I need to write the discussion about this article below Between 15.docx
I need to write the discussion about this article below Between 15.docxI need to write the discussion about this article below Between 15.docx
I need to write the discussion about this article below Between 15.docx
 
I need to write an entry assignment for my english class. I need i.docx
I need to write an entry assignment for my english class. I need i.docxI need to write an entry assignment for my english class. I need i.docx
I need to write an entry assignment for my english class. I need i.docx
 
I need to write a research argumentative essay. My topic is - .docx
I need to write a research argumentative essay. My topic is -  .docxI need to write a research argumentative essay. My topic is -  .docx
I need to write a research argumentative essay. My topic is - .docx
 
I only need it to be 400 words or less and use the following  reso.docx
I only need it to be 400 words or less and use the following  reso.docxI only need it to be 400 words or less and use the following  reso.docx
I only need it to be 400 words or less and use the following  reso.docx
 
i need you to read the informations below and then make a summary in.docx
i need you to read the informations below and then make a summary in.docxi need you to read the informations below and then make a summary in.docx
i need you to read the informations below and then make a summary in.docx
 
i need you do expend that to 2000 words1  including WAWN  which .docx
i need you do expend that to 2000 words1  including WAWN  which .docxi need you do expend that to 2000 words1  including WAWN  which .docx
i need you do expend that to 2000 words1  including WAWN  which .docx
 
i need you do expend that to 2000 words1  including WAWN  whic.docx
i need you do expend that to 2000 words1  including WAWN  whic.docxi need you do expend that to 2000 words1  including WAWN  whic.docx
i need you do expend that to 2000 words1  including WAWN  whic.docx
 
I need you to answer these 3 questions each write around 200 words. .docx
I need you to answer these 3 questions each write around 200 words. .docxI need you to answer these 3 questions each write around 200 words. .docx
I need you to answer these 3 questions each write around 200 words. .docx
 
i need to write a reflection paper onHIST 2010-016 Survey of Unite.docx
i need to write a reflection paper onHIST 2010-016 Survey of Unite.docxi need to write a reflection paper onHIST 2010-016 Survey of Unite.docx
i need to write a reflection paper onHIST 2010-016 Survey of Unite.docx
 
I need to have presentation and Ill upload the details.super si.docx
I need to have presentation and Ill upload the details.super si.docxI need to have presentation and Ill upload the details.super si.docx
I need to have presentation and Ill upload the details.super si.docx
 

Kürzlich hochgeladen

Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 

Kürzlich hochgeladen (20)

Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

I need reasonably brief, but complete answers for the following few .docx

  • 1. I need reasonably brief, but complete answers for the following few questions that I am stuck on. 1.a) Suppose class Y is derived from class X. Each class declares a constructor and a destructor. Class Y has a string member object that has a constructor and destructor. In what order do the three constructors and destructors run when instances of class Y are created and destroyed? b) Should X's destructor be declared virtual? Why or why not, and what difference would it make? 2. What is a pure virtual function? Why would you define a pure virtual function? Give an example of a pure virtual function. 3. What is an abstract base class? What does it do? Why would you make a class abstract? 4. What are the advantages of using an stl::string to hold character data vs. a dynamic char array?