SlideShare uma empresa Scribd logo
1 de 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?

Mais conteúdo relacionado

Mais de 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
 

Mais de 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
 

Último

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 

Último (20)

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

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?