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

Mais conteúdo relacionado

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

Keywords of java
Keywords of javaKeywords of java
Keywords of javaJani Harsh
 
1. Suppose you want to implement an ADT in which you can insert valu.pdf
1. Suppose you want to implement an ADT in which you can insert valu.pdf1. Suppose you want to implement an ADT in which you can insert valu.pdf
1. Suppose you want to implement an ADT in which you can insert valu.pdfforwardcom41
 
Ive posted 3 classes after the instruction that were given at star.pdf
Ive posted 3 classes after the instruction that were given at star.pdfIve posted 3 classes after the instruction that were given at star.pdf
Ive posted 3 classes after the instruction that were given at star.pdfdeepaarora22
 
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
 
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
 
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
 
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014Supriya Radhakrishna
 
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdfCreat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdfaromanets
 
Microsoft word java
Microsoft word   javaMicrosoft word   java
Microsoft word javaRavi Purohit
 
Chap2 class,objects contd
Chap2 class,objects contdChap2 class,objects contd
Chap2 class,objects contdraksharao
 
Alcohol Awareness Special Lecture ReflectionAlcohol is among the.docx
Alcohol Awareness Special Lecture ReflectionAlcohol is among the.docxAlcohol Awareness Special Lecture ReflectionAlcohol is among the.docx
Alcohol Awareness Special Lecture ReflectionAlcohol is among the.docxsimonlbentley59018
 
Lec 5 13_aug [compatibility mode]
Lec 5 13_aug [compatibility mode]Lec 5 13_aug [compatibility mode]
Lec 5 13_aug [compatibility mode]Palak Sanghani
 

Semelhante a Do the following with class Shape- a- Add prototypes for all required.docx (18)

Keywords of java
Keywords of javaKeywords of java
Keywords of java
 
1. Suppose you want to implement an ADT in which you can insert valu.pdf
1. Suppose you want to implement an ADT in which you can insert valu.pdf1. Suppose you want to implement an ADT in which you can insert valu.pdf
1. Suppose you want to implement an ADT in which you can insert valu.pdf
 
Ive posted 3 classes after the instruction that were given at star.pdf
Ive posted 3 classes after the instruction that were given at star.pdfIve posted 3 classes after the instruction that were given at star.pdf
Ive posted 3 classes after the instruction that were given at star.pdf
 
Java Inheritance
Java InheritanceJava Inheritance
Java Inheritance
 
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
 
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]
 
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
 
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
 
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdfCreat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
 
Microsoft word java
Microsoft word   javaMicrosoft word   java
Microsoft word java
 
Chap2 class,objects contd
Chap2 class,objects contdChap2 class,objects contd
Chap2 class,objects contd
 
Alcohol Awareness Special Lecture ReflectionAlcohol is among the.docx
Alcohol Awareness Special Lecture ReflectionAlcohol is among the.docxAlcohol Awareness Special Lecture ReflectionAlcohol is among the.docx
Alcohol Awareness Special Lecture ReflectionAlcohol is among the.docx
 
Lec 5 13_aug [compatibility mode]
Lec 5 13_aug [compatibility mode]Lec 5 13_aug [compatibility mode]
Lec 5 13_aug [compatibility mode]
 

Mais de rtodd615

Discuss reaction strategies to handle Malware-SolutionMalware- Malware.docx
Discuss reaction strategies to handle Malware-SolutionMalware- Malware.docxDiscuss reaction strategies to handle Malware-SolutionMalware- Malware.docx
Discuss reaction strategies to handle Malware-SolutionMalware- Malware.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
 
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
 
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
 
Discuss the difference between Financial Accounting and Managerial Acc (1).docx
Discuss the difference between Financial Accounting and Managerial Acc (1).docxDiscuss the difference between Financial Accounting and Managerial Acc (1).docx
Discuss the difference between Financial Accounting and Managerial Acc (1).docxrtodd615
 
Distinguish between individual barriers and organizational barriers to.docx
Distinguish between individual barriers and organizational barriers to.docxDistinguish between individual barriers and organizational barriers to.docx
Distinguish between individual barriers and organizational barriers to.docxrtodd615
 
Discussion Topic 1- Internal control consists of the policies and proc.docx
Discussion Topic 1- Internal control consists of the policies and proc.docxDiscussion Topic 1- Internal control consists of the policies and proc.docx
Discussion Topic 1- Internal control consists of the policies and proc.docxrtodd615
 
Discuss the tools and technologies for collaboration and teamwork that.docx
Discuss the tools and technologies for collaboration and teamwork that.docxDiscuss the tools and technologies for collaboration and teamwork that.docx
Discuss the tools and technologies for collaboration and teamwork that.docxrtodd615
 
Discuss the statement of cash flows Values Limitations This relates to.docx
Discuss the statement of cash flows Values Limitations This relates to.docxDiscuss the statement of cash flows Values Limitations This relates to.docx
Discuss the statement of cash flows Values Limitations This relates to.docxrtodd615
 
discuss the role of nanotechnology in today-'s information age-Solutio.docx
discuss the role of nanotechnology in today-'s information age-Solutio.docxdiscuss the role of nanotechnology in today-'s information age-Solutio.docx
discuss the role of nanotechnology in today-'s information age-Solutio.docxrtodd615
 
Discuss the reasons for the growing interest in and availability of hi.docx
Discuss the reasons for the growing interest in and availability of hi.docxDiscuss the reasons for the growing interest in and availability of hi.docx
Discuss the reasons for the growing interest in and availability of hi.docxrtodd615
 
Discuss the nature of Greek theater and the purpose it served in Ancie.docx
Discuss the nature of Greek theater and the purpose it served in Ancie.docxDiscuss the nature of Greek theater and the purpose it served in Ancie.docx
Discuss the nature of Greek theater and the purpose it served in Ancie.docxrtodd615
 
Discuss the impact of a strong culture on organization and managersSol.docx
Discuss the impact of a strong culture on organization and managersSol.docxDiscuss the impact of a strong culture on organization and managersSol.docx
Discuss the impact of a strong culture on organization and managersSol.docxrtodd615
 
Discuss the advantage and disadvantage of supporting links to files th.docx
Discuss the advantage and disadvantage of supporting links to files th.docxDiscuss the advantage and disadvantage of supporting links to files th.docx
Discuss the advantage and disadvantage of supporting links to files th.docxrtodd615
 
Discuss how engineers and risk experts view and deal with risks- (Appr.docx
Discuss how engineers and risk experts view and deal with risks- (Appr.docxDiscuss how engineers and risk experts view and deal with risks- (Appr.docx
Discuss how engineers and risk experts view and deal with risks- (Appr.docxrtodd615
 
Discuss how complementary social- managerial- and organizational asset.docx
Discuss how complementary social- managerial- and organizational asset.docxDiscuss how complementary social- managerial- and organizational asset.docx
Discuss how complementary social- managerial- and organizational asset.docxrtodd615
 
difference between Gre tunnel and vpn tunneling-Solution1- VPN tunneli.docx
difference between Gre tunnel and vpn tunneling-Solution1- VPN tunneli.docxdifference between Gre tunnel and vpn tunneling-Solution1- VPN tunneli.docx
difference between Gre tunnel and vpn tunneling-Solution1- VPN tunneli.docxrtodd615
 
Effective managers stay abreast of current HR topics- Some relevant is.docx
Effective managers stay abreast of current HR topics- Some relevant is.docxEffective managers stay abreast of current HR topics- Some relevant is.docx
Effective managers stay abreast of current HR topics- Some relevant is.docxrtodd615
 
effective managers stay abreast of current HR topics- Some relevant is (1).docx
effective managers stay abreast of current HR topics- Some relevant is (1).docxeffective managers stay abreast of current HR topics- Some relevant is (1).docx
effective managers stay abreast of current HR topics- Some relevant is (1).docxrtodd615
 

Mais de rtodd615 (20)

Discuss reaction strategies to handle Malware-SolutionMalware- Malware.docx
Discuss reaction strategies to handle Malware-SolutionMalware- Malware.docxDiscuss reaction strategies to handle Malware-SolutionMalware- Malware.docx
Discuss reaction strategies to handle Malware-SolutionMalware- Malware.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
 
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
 
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
 
Discuss the difference between Financial Accounting and Managerial Acc (1).docx
Discuss the difference between Financial Accounting and Managerial Acc (1).docxDiscuss the difference between Financial Accounting and Managerial Acc (1).docx
Discuss the difference between Financial Accounting and Managerial Acc (1).docx
 
Distinguish between individual barriers and organizational barriers to.docx
Distinguish between individual barriers and organizational barriers to.docxDistinguish between individual barriers and organizational barriers to.docx
Distinguish between individual barriers and organizational barriers to.docx
 
Discussion Topic 1- Internal control consists of the policies and proc.docx
Discussion Topic 1- Internal control consists of the policies and proc.docxDiscussion Topic 1- Internal control consists of the policies and proc.docx
Discussion Topic 1- Internal control consists of the policies and proc.docx
 
Discuss the tools and technologies for collaboration and teamwork that.docx
Discuss the tools and technologies for collaboration and teamwork that.docxDiscuss the tools and technologies for collaboration and teamwork that.docx
Discuss the tools and technologies for collaboration and teamwork that.docx
 
Discuss the statement of cash flows Values Limitations This relates to.docx
Discuss the statement of cash flows Values Limitations This relates to.docxDiscuss the statement of cash flows Values Limitations This relates to.docx
Discuss the statement of cash flows Values Limitations This relates to.docx
 
discuss the role of nanotechnology in today-'s information age-Solutio.docx
discuss the role of nanotechnology in today-'s information age-Solutio.docxdiscuss the role of nanotechnology in today-'s information age-Solutio.docx
discuss the role of nanotechnology in today-'s information age-Solutio.docx
 
Discuss the reasons for the growing interest in and availability of hi.docx
Discuss the reasons for the growing interest in and availability of hi.docxDiscuss the reasons for the growing interest in and availability of hi.docx
Discuss the reasons for the growing interest in and availability of hi.docx
 
Discuss the nature of Greek theater and the purpose it served in Ancie.docx
Discuss the nature of Greek theater and the purpose it served in Ancie.docxDiscuss the nature of Greek theater and the purpose it served in Ancie.docx
Discuss the nature of Greek theater and the purpose it served in Ancie.docx
 
Discuss the impact of a strong culture on organization and managersSol.docx
Discuss the impact of a strong culture on organization and managersSol.docxDiscuss the impact of a strong culture on organization and managersSol.docx
Discuss the impact of a strong culture on organization and managersSol.docx
 
Discuss the advantage and disadvantage of supporting links to files th.docx
Discuss the advantage and disadvantage of supporting links to files th.docxDiscuss the advantage and disadvantage of supporting links to files th.docx
Discuss the advantage and disadvantage of supporting links to files th.docx
 
Discuss how engineers and risk experts view and deal with risks- (Appr.docx
Discuss how engineers and risk experts view and deal with risks- (Appr.docxDiscuss how engineers and risk experts view and deal with risks- (Appr.docx
Discuss how engineers and risk experts view and deal with risks- (Appr.docx
 
Discuss how complementary social- managerial- and organizational asset.docx
Discuss how complementary social- managerial- and organizational asset.docxDiscuss how complementary social- managerial- and organizational asset.docx
Discuss how complementary social- managerial- and organizational asset.docx
 
difference between Gre tunnel and vpn tunneling-Solution1- VPN tunneli.docx
difference between Gre tunnel and vpn tunneling-Solution1- VPN tunneli.docxdifference between Gre tunnel and vpn tunneling-Solution1- VPN tunneli.docx
difference between Gre tunnel and vpn tunneling-Solution1- VPN tunneli.docx
 
Effective managers stay abreast of current HR topics- Some relevant is.docx
Effective managers stay abreast of current HR topics- Some relevant is.docxEffective managers stay abreast of current HR topics- Some relevant is.docx
Effective managers stay abreast of current HR topics- Some relevant is.docx
 
effective managers stay abreast of current HR topics- Some relevant is (1).docx
effective managers stay abreast of current HR topics- Some relevant is (1).docxeffective managers stay abreast of current HR topics- Some relevant is (1).docx
effective managers stay abreast of current HR topics- Some relevant is (1).docx
 

Último

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
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
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
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
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 

Último (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.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
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
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
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
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"
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 

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