SlideShare une entreprise Scribd logo
1  sur  3
Télécharger pour lire hors ligne
Do the following with class Shape:
a. Add prototypes for all required methods and operators for the class (the Point class is the one
from problem one above).
// 1) *******************************************************************
template
class Point {
public:
void setX(T a) {
X = a;
}
void setY(T b) {
Y = b;
}
T getX() {
return X;
}
T getY() {
return Y;
}
private:
T X;
T Y;
};
// 2) *******************************************************************
template
class Shape
{
public:
Shape     ();
Shape     (const Shape &);
virtual              ~Shape     ();
Shape &Â Â Â Â Â Â Â Â Â Â Â Â Â Â operator =Â Â (const Shape &);
const Point <int> &     GetOrigin  () const;
bool              SetOrigin  (const Shape &);
private:
Point <T>Â Â Â Â Â Â Â Â Â Â Â Origin;
};
template <class T>
Shape <T>::Shape ()
{
cout << "Shape Default Constructor" << endl;
}
template <class T>
Shape <T>::Shape (const Shape & S): Origin (S.Origin)
{
}
template <class T>
Shape <T>::~Shape ()
{
cout << "Shape Destructor" << endl;
}
template <class T>
Shape <T> & Shape <T>::operator = (const Shape <T> & S)
{
Origin = S.Origin;
return *this;
}
Solution
template <class T>
class Point {
public:
void setX(T a) {
X = a;
}
void setY(T b) {
Y = b;
}
T getX() {
return X;
}
T getY() {
return Y;
}
private:
T X;
T Y;
};
Please let me know in case of any issue

Contenu connexe

Similaire à Do the following with class Shape- a- Add prototypes for all required.docx

WRITE A C++ PROGRAM TO IMPLEMENT THE FOLLOWING.pdf
WRITE A C++ PROGRAM TO IMPLEMENT THE FOLLOWING.pdfWRITE A C++ PROGRAM TO IMPLEMENT THE FOLLOWING.pdf
WRITE A C++ PROGRAM TO IMPLEMENT THE FOLLOWING.pdfindiaartz
 
Chapter 6.6
Chapter 6.6Chapter 6.6
Chapter 6.6sotlsoc
 
Keywords of java
Keywords of javaKeywords of java
Keywords of javaJani Harsh
 
Question 1- Find the value of the following C++ expressions- Write the.docx
Question 1- Find the value of the following C++ expressions- Write the.docxQuestion 1- Find the value of the following C++ expressions- Write the.docx
Question 1- Find the value of the following C++ expressions- Write the.docxtodd921
 
package houseSeries;public class HouseDriver { Please impleme.pdf
package houseSeries;public class HouseDriver {  Please impleme.pdfpackage houseSeries;public class HouseDriver {  Please impleme.pdf
package houseSeries;public class HouseDriver { Please impleme.pdfamazing2001
 
Assignment InstructionsInstructions Make sure you go to .docx
Assignment InstructionsInstructions Make sure you go to .docxAssignment InstructionsInstructions Make sure you go to .docx
Assignment InstructionsInstructions Make sure you go to .docxstandfordabbot
 
Help in JAVAThis program should input numerator and denominator f.pdf
Help in JAVAThis program should input numerator and denominator f.pdfHelp in JAVAThis program should input numerator and denominator f.pdf
Help in JAVAThis program should input numerator and denominator f.pdfmanjan6
 
Matrix multiplication is an important operation in numeric methods- Gi.docx
Matrix multiplication is an important operation in numeric methods- Gi.docxMatrix multiplication is an important operation in numeric methods- Gi.docx
Matrix multiplication is an important operation in numeric methods- Gi.docxlauracallander
 
student start_code_U08223_cwk1 (1).DS_Store__MACOSXstudent.docx
student start_code_U08223_cwk1 (1).DS_Store__MACOSXstudent.docxstudent start_code_U08223_cwk1 (1).DS_Store__MACOSXstudent.docx
student start_code_U08223_cwk1 (1).DS_Store__MACOSXstudent.docxhanneloremccaffery
 
Assignment for Factory Method Design Pattern in C# [ANSWERS]
Assignment for Factory Method Design Pattern in C# [ANSWERS]Assignment for Factory Method Design Pattern in C# [ANSWERS]
Assignment for Factory Method Design Pattern in C# [ANSWERS]Kasun Ranga Wijeweera
 
1- In the question above- what is the declared type of f2- Select one-.docx
1- In the question above- what is the declared type of f2- Select one-.docx1- In the question above- what is the declared type of f2- Select one-.docx
1- In the question above- what is the declared type of f2- Select one-.docxtjames442
 
Assignment Instructions Instructions Make sure you go to.docx
Assignment Instructions Instructions Make sure you go to.docxAssignment Instructions Instructions Make sure you go to.docx
Assignment Instructions Instructions Make sure you go to.docxstandfordabbot
 
Contains a method codevoid display()code that all the .pdf
Contains a method codevoid display()code that all the .pdfContains a method codevoid display()code that all the .pdf
Contains a method codevoid display()code that all the .pdfeyewaregallery
 
Object Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsObject Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsMuhammadTalha436
 
(In java language)1. Use recursion in implementing the binarySearc.pdf
(In java language)1. Use recursion in implementing the binarySearc.pdf(In java language)1. Use recursion in implementing the binarySearc.pdf
(In java language)1. Use recursion in implementing the binarySearc.pdfrbjain2007
 
Class & Object - User Defined Method
Class & Object - User Defined MethodClass & Object - User Defined Method
Class & Object - User Defined MethodPRN USM
 
Ch03_stacks_and_queues.ppt
Ch03_stacks_and_queues.pptCh03_stacks_and_queues.ppt
Ch03_stacks_and_queues.pptOliverKane3
 
EmptyCollectionException-java -- - Represents the situation in which.docx
EmptyCollectionException-java --  - Represents the situation in which.docxEmptyCollectionException-java --  - Represents the situation in which.docx
EmptyCollectionException-java -- - Represents the situation in which.docxBlakeSGMHemmingss
 

Similaire à Do the following with class Shape- a- Add prototypes for all required.docx (20)

C chap22
C chap22C chap22
C chap22
 
WRITE A C++ PROGRAM TO IMPLEMENT THE FOLLOWING.pdf
WRITE A C++ PROGRAM TO IMPLEMENT THE FOLLOWING.pdfWRITE A C++ PROGRAM TO IMPLEMENT THE FOLLOWING.pdf
WRITE A C++ PROGRAM TO IMPLEMENT THE FOLLOWING.pdf
 
Chapter 6.6
Chapter 6.6Chapter 6.6
Chapter 6.6
 
Keywords of java
Keywords of javaKeywords of java
Keywords of java
 
Question 1- Find the value of the following C++ expressions- Write the.docx
Question 1- Find the value of the following C++ expressions- Write the.docxQuestion 1- Find the value of the following C++ expressions- Write the.docx
Question 1- Find the value of the following C++ expressions- Write the.docx
 
Java Inheritance
Java InheritanceJava Inheritance
Java Inheritance
 
package houseSeries;public class HouseDriver { Please impleme.pdf
package houseSeries;public class HouseDriver {  Please impleme.pdfpackage houseSeries;public class HouseDriver {  Please impleme.pdf
package houseSeries;public class HouseDriver { Please impleme.pdf
 
Assignment InstructionsInstructions Make sure you go to .docx
Assignment InstructionsInstructions Make sure you go to .docxAssignment InstructionsInstructions Make sure you go to .docx
Assignment InstructionsInstructions Make sure you go to .docx
 
Help in JAVAThis program should input numerator and denominator f.pdf
Help in JAVAThis program should input numerator and denominator f.pdfHelp in JAVAThis program should input numerator and denominator f.pdf
Help in JAVAThis program should input numerator and denominator f.pdf
 
Matrix multiplication is an important operation in numeric methods- Gi.docx
Matrix multiplication is an important operation in numeric methods- Gi.docxMatrix multiplication is an important operation in numeric methods- Gi.docx
Matrix multiplication is an important operation in numeric methods- Gi.docx
 
student start_code_U08223_cwk1 (1).DS_Store__MACOSXstudent.docx
student start_code_U08223_cwk1 (1).DS_Store__MACOSXstudent.docxstudent start_code_U08223_cwk1 (1).DS_Store__MACOSXstudent.docx
student start_code_U08223_cwk1 (1).DS_Store__MACOSXstudent.docx
 
Assignment for Factory Method Design Pattern in C# [ANSWERS]
Assignment for Factory Method Design Pattern in C# [ANSWERS]Assignment for Factory Method Design Pattern in C# [ANSWERS]
Assignment for Factory Method Design Pattern in C# [ANSWERS]
 
1- In the question above- what is the declared type of f2- Select one-.docx
1- In the question above- what is the declared type of f2- Select one-.docx1- In the question above- what is the declared type of f2- Select one-.docx
1- In the question above- what is the declared type of f2- Select one-.docx
 
Assignment Instructions Instructions Make sure you go to.docx
Assignment Instructions Instructions Make sure you go to.docxAssignment Instructions Instructions Make sure you go to.docx
Assignment Instructions Instructions Make sure you go to.docx
 
Contains a method codevoid display()code that all the .pdf
Contains a method codevoid display()code that all the .pdfContains a method codevoid display()code that all the .pdf
Contains a method codevoid display()code that all the .pdf
 
Object Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsObject Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ Exams
 
(In java language)1. Use recursion in implementing the binarySearc.pdf
(In java language)1. Use recursion in implementing the binarySearc.pdf(In java language)1. Use recursion in implementing the binarySearc.pdf
(In java language)1. Use recursion in implementing the binarySearc.pdf
 
Class & Object - User Defined Method
Class & Object - User Defined MethodClass & Object - User Defined Method
Class & Object - User Defined Method
 
Ch03_stacks_and_queues.ppt
Ch03_stacks_and_queues.pptCh03_stacks_and_queues.ppt
Ch03_stacks_and_queues.ppt
 
EmptyCollectionException-java -- - Represents the situation in which.docx
EmptyCollectionException-java --  - Represents the situation in which.docxEmptyCollectionException-java --  - Represents the situation in which.docx
EmptyCollectionException-java -- - Represents the situation in which.docx
 

Plus de rtodd615

During Heaton Company During Heaton Company Solution1-Prepare a.docx
During Heaton Company     During Heaton Company    Solution1-Prepare a.docxDuring Heaton Company     During Heaton Company    Solution1-Prepare a.docx
During Heaton Company During Heaton Company Solution1-Prepare a.docxrtodd615
 
During its first year of operations- Beta Company paid $26-310 for dir.docx
During its first year of operations- Beta Company paid $26-310 for dir.docxDuring its first year of operations- Beta Company paid $26-310 for dir.docx
During its first year of operations- Beta Company paid $26-310 for dir.docxrtodd615
 
During launches- rockets often discard unneeded parts- A certain rocke.docx
During launches- rockets often discard unneeded parts- A certain rocke.docxDuring launches- rockets often discard unneeded parts- A certain rocke.docx
During launches- rockets often discard unneeded parts- A certain rocke.docxrtodd615
 
During Heaton Companys first two years of operations- the company repo.docx
During Heaton Companys first two years of operations- the company repo.docxDuring Heaton Companys first two years of operations- the company repo.docx
During Heaton Companys first two years of operations- the company repo.docxrtodd615
 
During 2014- Weaver sold some equipment for $18 that had cost $30 and.docx
During 2014- Weaver sold some equipment for $18 that had cost $30 and.docxDuring 2014- Weaver sold some equipment for $18 that had cost $30 and.docx
During 2014- Weaver sold some equipment for $18 that had cost $30 and.docxrtodd615
 
dug ypl Ed thod- Al the goods b d to Pemb ting Alberta- Pemb the perp.docx
dug ypl Ed thod- Al the goods b d to Pemb ting Alberta- Pemb the perp.docxdug ypl Ed thod- Al the goods b d to Pemb ting Alberta- Pemb the perp.docx
dug ypl Ed thod- Al the goods b d to Pemb ting Alberta- Pemb the perp.docxrtodd615
 
Dresser CompanySolutionanswer--- please find the ans-- Date.docx
Dresser CompanySolutionanswer--- please find the ans--        Date.docxDresser CompanySolutionanswer--- please find the ans--        Date.docx
Dresser CompanySolutionanswer--- please find the ans-- Date.docxrtodd615
 
Drawstring Manufacturing has 800 obsolete personal computers that are.docx
Drawstring Manufacturing has 800 obsolete personal computers that are.docxDrawstring Manufacturing has 800 obsolete personal computers that are.docx
Drawstring Manufacturing has 800 obsolete personal computers that are.docxrtodd615
 
Discuss the differences between a form and a report- What characterist.docx
Discuss the differences between a form and a report- What characterist.docxDiscuss the differences between a form and a report- What characterist.docx
Discuss the differences between a form and a report- What characterist.docxrtodd615
 
Donellan Company has a standard and flexible budgeting system and uses.docx
Donellan Company has a standard and flexible budgeting system and uses.docxDonellan Company has a standard and flexible budgeting system and uses.docx
Donellan Company has a standard and flexible budgeting system and uses.docxrtodd615
 
Discuss in scholarly detail why budgets- schedules- and key success fa.docx
Discuss in scholarly detail why budgets- schedules- and key success fa.docxDiscuss in scholarly detail why budgets- schedules- and key success fa.docx
Discuss in scholarly detail why budgets- schedules- and key success fa.docxrtodd615
 
does the set of vectors span R 3- explain your answerSolution Any thre.docx
does the set of vectors span R 3- explain your answerSolution Any thre.docxdoes the set of vectors span R 3- explain your answerSolution Any thre.docx
does the set of vectors span R 3- explain your answerSolution Any thre.docxrtodd615
 
Discuss how to pass the address of an array to a function and provide.docx
Discuss how to pass the address of an array to a function and provide.docxDiscuss how to pass the address of an array to a function and provide.docx
Discuss how to pass the address of an array to a function and provide.docxrtodd615
 
DQuestion 23 10 pts Explain how the de Broglie wavelength is related t.docx
DQuestion 23 10 pts Explain how the de Broglie wavelength is related t.docxDQuestion 23 10 pts Explain how the de Broglie wavelength is related t.docx
DQuestion 23 10 pts Explain how the de Broglie wavelength is related t.docxrtodd615
 
DONT USE JAVA! ITS A SPARC ASSEMBLY LANGUAGE! It has to be in a -m fil.docx
DONT USE JAVA! ITS A SPARC ASSEMBLY LANGUAGE! It has to be in a -m fil.docxDONT USE JAVA! ITS A SPARC ASSEMBLY LANGUAGE! It has to be in a -m fil.docx
DONT USE JAVA! ITS A SPARC ASSEMBLY LANGUAGE! It has to be in a -m fil.docxrtodd615
 
Do you think the benefits of government regulation exceed the costs- I.docx
Do you think the benefits of government regulation exceed the costs- I.docxDo you think the benefits of government regulation exceed the costs- I.docx
Do you think the benefits of government regulation exceed the costs- I.docxrtodd615
 
Doisneau 16-year bonds have an annual coupon interest of 11 percent- m.docx
Doisneau 16-year bonds have an annual coupon interest of 11 percent- m.docxDoisneau 16-year bonds have an annual coupon interest of 11 percent- m.docx
Doisneau 16-year bonds have an annual coupon interest of 11 percent- m.docxrtodd615
 
Does any of the following have the smallest atomic radius- a) Sr b) M.docx
Does any of the following have the smallest atomic radius-  a) Sr b) M.docxDoes any of the following have the smallest atomic radius-  a) Sr b) M.docx
Does any of the following have the smallest atomic radius- a) Sr b) M.docxrtodd615
 
Discuss in scholarly detail implications of any considerations that sh.docx
Discuss in scholarly detail implications of any considerations that sh.docxDiscuss in scholarly detail implications of any considerations that sh.docx
Discuss in scholarly detail implications of any considerations that sh.docxrtodd615
 
Does adding debt increase or decrease the flexibility of a healthcare.docx
Does adding debt increase or decrease the flexibility of a healthcare.docxDoes adding debt increase or decrease the flexibility of a healthcare.docx
Does adding debt increase or decrease the flexibility of a healthcare.docxrtodd615
 

Plus de rtodd615 (20)

During Heaton Company During Heaton Company Solution1-Prepare a.docx
During Heaton Company     During Heaton Company    Solution1-Prepare a.docxDuring Heaton Company     During Heaton Company    Solution1-Prepare a.docx
During Heaton Company During Heaton Company Solution1-Prepare a.docx
 
During its first year of operations- Beta Company paid $26-310 for dir.docx
During its first year of operations- Beta Company paid $26-310 for dir.docxDuring its first year of operations- Beta Company paid $26-310 for dir.docx
During its first year of operations- Beta Company paid $26-310 for dir.docx
 
During launches- rockets often discard unneeded parts- A certain rocke.docx
During launches- rockets often discard unneeded parts- A certain rocke.docxDuring launches- rockets often discard unneeded parts- A certain rocke.docx
During launches- rockets often discard unneeded parts- A certain rocke.docx
 
During Heaton Companys first two years of operations- the company repo.docx
During Heaton Companys first two years of operations- the company repo.docxDuring Heaton Companys first two years of operations- the company repo.docx
During Heaton Companys first two years of operations- the company repo.docx
 
During 2014- Weaver sold some equipment for $18 that had cost $30 and.docx
During 2014- Weaver sold some equipment for $18 that had cost $30 and.docxDuring 2014- Weaver sold some equipment for $18 that had cost $30 and.docx
During 2014- Weaver sold some equipment for $18 that had cost $30 and.docx
 
dug ypl Ed thod- Al the goods b d to Pemb ting Alberta- Pemb the perp.docx
dug ypl Ed thod- Al the goods b d to Pemb ting Alberta- Pemb the perp.docxdug ypl Ed thod- Al the goods b d to Pemb ting Alberta- Pemb the perp.docx
dug ypl Ed thod- Al the goods b d to Pemb ting Alberta- Pemb the perp.docx
 
Dresser CompanySolutionanswer--- please find the ans-- Date.docx
Dresser CompanySolutionanswer--- please find the ans--        Date.docxDresser CompanySolutionanswer--- please find the ans--        Date.docx
Dresser CompanySolutionanswer--- please find the ans-- Date.docx
 
Drawstring Manufacturing has 800 obsolete personal computers that are.docx
Drawstring Manufacturing has 800 obsolete personal computers that are.docxDrawstring Manufacturing has 800 obsolete personal computers that are.docx
Drawstring Manufacturing has 800 obsolete personal computers that are.docx
 
Discuss the differences between a form and a report- What characterist.docx
Discuss the differences between a form and a report- What characterist.docxDiscuss the differences between a form and a report- What characterist.docx
Discuss the differences between a form and a report- What characterist.docx
 
Donellan Company has a standard and flexible budgeting system and uses.docx
Donellan Company has a standard and flexible budgeting system and uses.docxDonellan Company has a standard and flexible budgeting system and uses.docx
Donellan Company has a standard and flexible budgeting system and uses.docx
 
Discuss in scholarly detail why budgets- schedules- and key success fa.docx
Discuss in scholarly detail why budgets- schedules- and key success fa.docxDiscuss in scholarly detail why budgets- schedules- and key success fa.docx
Discuss in scholarly detail why budgets- schedules- and key success fa.docx
 
does the set of vectors span R 3- explain your answerSolution Any thre.docx
does the set of vectors span R 3- explain your answerSolution Any thre.docxdoes the set of vectors span R 3- explain your answerSolution Any thre.docx
does the set of vectors span R 3- explain your answerSolution Any thre.docx
 
Discuss how to pass the address of an array to a function and provide.docx
Discuss how to pass the address of an array to a function and provide.docxDiscuss how to pass the address of an array to a function and provide.docx
Discuss how to pass the address of an array to a function and provide.docx
 
DQuestion 23 10 pts Explain how the de Broglie wavelength is related t.docx
DQuestion 23 10 pts Explain how the de Broglie wavelength is related t.docxDQuestion 23 10 pts Explain how the de Broglie wavelength is related t.docx
DQuestion 23 10 pts Explain how the de Broglie wavelength is related t.docx
 
DONT USE JAVA! ITS A SPARC ASSEMBLY LANGUAGE! It has to be in a -m fil.docx
DONT USE JAVA! ITS A SPARC ASSEMBLY LANGUAGE! It has to be in a -m fil.docxDONT USE JAVA! ITS A SPARC ASSEMBLY LANGUAGE! It has to be in a -m fil.docx
DONT USE JAVA! ITS A SPARC ASSEMBLY LANGUAGE! It has to be in a -m fil.docx
 
Do you think the benefits of government regulation exceed the costs- I.docx
Do you think the benefits of government regulation exceed the costs- I.docxDo you think the benefits of government regulation exceed the costs- I.docx
Do you think the benefits of government regulation exceed the costs- I.docx
 
Doisneau 16-year bonds have an annual coupon interest of 11 percent- m.docx
Doisneau 16-year bonds have an annual coupon interest of 11 percent- m.docxDoisneau 16-year bonds have an annual coupon interest of 11 percent- m.docx
Doisneau 16-year bonds have an annual coupon interest of 11 percent- m.docx
 
Does any of the following have the smallest atomic radius- a) Sr b) M.docx
Does any of the following have the smallest atomic radius-  a) Sr b) M.docxDoes any of the following have the smallest atomic radius-  a) Sr b) M.docx
Does any of the following have the smallest atomic radius- a) Sr b) M.docx
 
Discuss in scholarly detail implications of any considerations that sh.docx
Discuss in scholarly detail implications of any considerations that sh.docxDiscuss in scholarly detail implications of any considerations that sh.docx
Discuss in scholarly detail implications of any considerations that sh.docx
 
Does adding debt increase or decrease the flexibility of a healthcare.docx
Does adding debt increase or decrease the flexibility of a healthcare.docxDoes adding debt increase or decrease the flexibility of a healthcare.docx
Does adding debt increase or decrease the flexibility of a healthcare.docx
 

Dernier

How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17Celine George
 
3.21.24 The Origins of Black Power.pptx
3.21.24  The Origins of Black Power.pptx3.21.24  The Origins of Black Power.pptx
3.21.24 The Origins of Black Power.pptxmary850239
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapitolTechU
 
Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational PhilosophyShuvankar Madhu
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17Celine George
 
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfMaximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfTechSoup
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17Celine George
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17Celine George
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.EnglishCEIPdeSigeiro
 
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptxSandy Millin
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?TechSoup
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICESayali Powar
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice documentXsasf Sfdfasd
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRATanmoy Mishra
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesMohammad Hassany
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxraviapr7
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxEduSkills OECD
 

Dernier (20)

How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17
 
3.21.24 The Origins of Black Power.pptx
3.21.24  The Origins of Black Power.pptx3.21.24  The Origins of Black Power.pptx
3.21.24 The Origins of Black Power.pptx
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptx
 
Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational Philosophy
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17
 
Personal Resilience in Project Management 2 - TV Edit 1a.pdf
Personal Resilience in Project Management 2 - TV Edit 1a.pdfPersonal Resilience in Project Management 2 - TV Edit 1a.pdf
Personal Resilience in Project Management 2 - TV Edit 1a.pdf
 
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfMaximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.
 
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICE
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice document
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming Classes
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptx
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
 

Do the following with class Shape- a- Add prototypes for all required.docx

  • 1. Do the following with class Shape: a. Add prototypes for all required methods and operators for the class (the Point class is the one from problem one above). // 1) ******************************************************************* template class Point { public: void setX(T a) { X = a; } void setY(T b) { Y = b; } T getX() { return X; } T getY() { return Y; } private: T X; T Y; }; // 2) ******************************************************************* template class Shape { public: Shape     (); Shape     (const Shape &); virtual              ~Shape     (); Shape &              operator =  (const Shape &);
  • 2. const Point <int> &     GetOrigin  () const; bool              SetOrigin  (const Shape &); private: Point <T>           Origin; }; template <class T> Shape <T>::Shape () { cout << "Shape Default Constructor" << endl; } template <class T> Shape <T>::Shape (const Shape & S): Origin (S.Origin) { } template <class T> Shape <T>::~Shape () { cout << "Shape Destructor" << endl; } template <class T> Shape <T> & Shape <T>::operator = (const Shape <T> & S) { Origin = S.Origin; return *this; } Solution template <class T> class Point {
  • 3. public: void setX(T a) { X = a; } void setY(T b) { Y = b; } T getX() { return X; } T getY() { return Y; } private: T X; T Y; }; Please let me know in case of any issue