SlideShare a Scribd company logo
1 of 1
Download to read offline
#include #include #include using namespace std; class Point { public: Point(int x, int y) :
m_x(x), m_y(y) {} int getX() const { return m_x; } int getY() const { return m_y; } private: int
m_x, m_y; }; class Shape { public: Shape(const string& name, const Point& p) : m_name(name),
m_point(p) {} virtual ~Shape() {} virtual void draw() const = 0; virtual void print() const { cout
<< "Shape: " << m_name << " (" << m_point.getX() << "," << m_point.getY() << ")" << endl; }
private: string m_name; Point m_point; }; class OneD : public Shape { public: OneD(const
string& name, const Point& p1, const Point& p2) : Shape(name, p1), m_p2(p2) {} void draw()
const override {} void print() const override { Shape::print(); cout << " Point2: (" <<
m_p2.getX() << "," << m_p2.getY() << ")" << endl; } private: Point m_p2; }; class TwoD :
public Shape { public: TwoD(const string& name, const Point& p) : Shape(name, p) {} void
draw() const override {} }; class ThreeD : public Shape { public: ThreeD(const string& name,
const Point& p) : Shape(name, p) {} void draw() const override {} }; class Line : public OneD {
public: Line(const string& name, const Point& p1, const Point& p2) : OneD(name, p1, p2) {}
void draw() const override {} }; class Curve : public OneD { public: Curve(const string& name,
const Point& p1, const Point& p2, const Point& p3) : OneD(name, p1, p2), m_p3(p3) {} void
draw() const override {} void print() const override { OneD::print(); cout << " Point3: (" <<
m_p3.getX() << "," << m_p3.getY() << ")" << endl; } private: Point m_p3; }; class Circle :
public TwoD { public: Circle(const string& name, const Point& p, double radius) : TwoD(name,
p), m_radius(radius) {} void draw() const override {} void print() const override {
TwoD::print(); cout << " Radius: " << m_radius << endl; } private: double m_radius; }; class
Rectangle : public TwoD { public: Rectangle(const string& name, const Point& p1, const
Point& p2) : TwoD(name, p1), m_p2(p2) {} void draw() const override {} void print() const
override { TwoD::print(); cout << " Point2: (" << m_p2.getX() << "," << m_p2.getY() << ")" <<
endl; } private: Point m_p2; }; class Sphere : public ThreeD { public: Sphere(const string&
name, const Point& p, double radius) : ThreeD(name, p), m_radius(radius) {} void draw() const
override {} void print() const override { ThreeD::print(); cout << " Radius: " << m_radius <<
endl; } private
Errors I am getting. Please fix.

More Related Content

Similar to #include iostream #include vector #include string using namesp.pdf

code#includeiostream using namespace std; class Point {.pdf
code#includeiostream using namespace std; class Point {.pdfcode#includeiostream using namespace std; class Point {.pdf
code#includeiostream using namespace std; class Point {.pdfARYAN20071
 
Go ahead, make my day
Go ahead, make my dayGo ahead, make my day
Go ahead, make my dayTor Ivry
 
Pads lab manual final
Pads lab manual finalPads lab manual final
Pads lab manual finalAhalyaR
 
Help with the following code1. Rewrite to be contained in a vecto.pdf
Help with the following code1. Rewrite to be contained in a vecto.pdfHelp with the following code1. Rewrite to be contained in a vecto.pdf
Help with the following code1. Rewrite to be contained in a vecto.pdfezzi97
 
C++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorC++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorJussi Pohjolainen
 
Csphtp1 09
Csphtp1 09Csphtp1 09
Csphtp1 09HUST
 
#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf
#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf
#ifndef COURSES_H #define COURSES_H class Courses { privat.pdfanupambedcovers
 
L25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptxL25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptxhappycocoman
 

Similar to #include iostream #include vector #include string using namesp.pdf (20)

Oop objects_classes
Oop objects_classesOop objects_classes
Oop objects_classes
 
Lecture4
Lecture4Lecture4
Lecture4
 
Lecture4
Lecture4Lecture4
Lecture4
 
12
1212
12
 
code#includeiostream using namespace std; class Point {.pdf
code#includeiostream using namespace std; class Point {.pdfcode#includeiostream using namespace std; class Point {.pdf
code#includeiostream using namespace std; class Point {.pdf
 
C++ programs
C++ programsC++ programs
C++ programs
 
662305 10
662305 10662305 10
662305 10
 
Go ahead, make my day
Go ahead, make my dayGo ahead, make my day
Go ahead, make my day
 
Pads lab manual final
Pads lab manual finalPads lab manual final
Pads lab manual final
 
C++ L09-Classes Part2
C++ L09-Classes Part2C++ L09-Classes Part2
C++ L09-Classes Part2
 
Help with the following code1. Rewrite to be contained in a vecto.pdf
Help with the following code1. Rewrite to be contained in a vecto.pdfHelp with the following code1. Rewrite to be contained in a vecto.pdf
Help with the following code1. Rewrite to be contained in a vecto.pdf
 
C++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorC++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operator
 
oop Lecture 5
oop Lecture 5oop Lecture 5
oop Lecture 5
 
oop objects_classes
oop objects_classesoop objects_classes
oop objects_classes
 
3433 Ch09 Ppt
3433 Ch09 Ppt3433 Ch09 Ppt
3433 Ch09 Ppt
 
Csphtp1 09
Csphtp1 09Csphtp1 09
Csphtp1 09
 
#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf
#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf
#ifndef COURSES_H #define COURSES_H class Courses { privat.pdf
 
C++ Inheritance
C++ InheritanceC++ Inheritance
C++ Inheritance
 
L25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptxL25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptx
 
New presentation oop
New presentation oopNew presentation oop
New presentation oop
 

More from alstradecentreerode

(Rational Class) - use the original files to create the new progra.pdf
(Rational Class) - use the original files to create the new progra.pdf(Rational Class) - use the original files to create the new progra.pdf
(Rational Class) - use the original files to create the new progra.pdfalstradecentreerode
 
(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf
(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf
(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdfalstradecentreerode
 
(if any) is your opportunity cost.pdf
(if any) is your opportunity cost.pdf(if any) is your opportunity cost.pdf
(if any) is your opportunity cost.pdfalstradecentreerode
 
(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf
(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf
(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdfalstradecentreerode
 
(Elementary Statistics) Computer=1100(102r+1).pdf
(Elementary Statistics) Computer=1100(102r+1).pdf(Elementary Statistics) Computer=1100(102r+1).pdf
(Elementary Statistics) Computer=1100(102r+1).pdfalstradecentreerode
 
(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf
(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf
(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdfalstradecentreerode
 
(d) Give a single line of R code that will produce a plot exactly li.pdf
(d) Give a single line of R code that will produce a plot exactly li.pdf(d) Give a single line of R code that will produce a plot exactly li.pdf
(d) Give a single line of R code that will produce a plot exactly li.pdfalstradecentreerode
 
(5 points) There are seven boys and six girls. Coach wants to select.pdf
(5 points) There are seven boys and six girls. Coach wants to select.pdf(5 points) There are seven boys and six girls. Coach wants to select.pdf
(5 points) There are seven boys and six girls. Coach wants to select.pdfalstradecentreerode
 
(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf
(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf
(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdfalstradecentreerode
 
(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf
(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf
(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdfalstradecentreerode
 
(10 points) Construct a BST by inserting the following keys into an .pdf
(10 points) Construct a BST by inserting the following keys into an .pdf(10 points) Construct a BST by inserting the following keys into an .pdf
(10 points) Construct a BST by inserting the following keys into an .pdfalstradecentreerode
 
#2 Listed below are the numbers of triplets born in a country each y.pdf
#2 Listed below are the numbers of triplets born in a country each y.pdf#2 Listed below are the numbers of triplets born in a country each y.pdf
#2 Listed below are the numbers of triplets born in a country each y.pdfalstradecentreerode
 
#52 In a large American university in 1969, the male and female pro.pdf
#52 In a large American university in 1969, the male and female pro.pdf#52 In a large American university in 1969, the male and female pro.pdf
#52 In a large American university in 1969, the male and female pro.pdfalstradecentreerode
 
#define LOGFILE signal_log.txt Signal handlers void sigusr1.pdf
#define LOGFILE signal_log.txt  Signal handlers void sigusr1.pdf#define LOGFILE signal_log.txt  Signal handlers void sigusr1.pdf
#define LOGFILE signal_log.txt Signal handlers void sigusr1.pdfalstradecentreerode
 
�Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf
 �Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf �Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf
�Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdfalstradecentreerode
 
�derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf
 �derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf �derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf
�derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdfalstradecentreerode
 
�Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf
 �Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf �Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf
�Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdfalstradecentreerode
 
�Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf
 �Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf �Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf
�Cu�les de los siguientes son ejemplos de intervenciones de educa.pdfalstradecentreerode
 
�Cu�l de los siguientes se considera un indicador principal de la e.pdf
 �Cu�l de los siguientes se considera un indicador principal de la e.pdf �Cu�l de los siguientes se considera un indicador principal de la e.pdf
�Cu�l de los siguientes se considera un indicador principal de la e.pdfalstradecentreerode
 

More from alstradecentreerode (20)

(Rational Class) - use the original files to create the new progra.pdf
(Rational Class) - use the original files to create the new progra.pdf(Rational Class) - use the original files to create the new progra.pdf
(Rational Class) - use the original files to create the new progra.pdf
 
(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf
(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf
(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf
 
(if any) is your opportunity cost.pdf
(if any) is your opportunity cost.pdf(if any) is your opportunity cost.pdf
(if any) is your opportunity cost.pdf
 
(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf
(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf
(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf
 
(Elementary Statistics) Computer=1100(102r+1).pdf
(Elementary Statistics) Computer=1100(102r+1).pdf(Elementary Statistics) Computer=1100(102r+1).pdf
(Elementary Statistics) Computer=1100(102r+1).pdf
 
(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf
(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf
(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf
 
(d) Give a single line of R code that will produce a plot exactly li.pdf
(d) Give a single line of R code that will produce a plot exactly li.pdf(d) Give a single line of R code that will produce a plot exactly li.pdf
(d) Give a single line of R code that will produce a plot exactly li.pdf
 
(5 points) There are seven boys and six girls. Coach wants to select.pdf
(5 points) There are seven boys and six girls. Coach wants to select.pdf(5 points) There are seven boys and six girls. Coach wants to select.pdf
(5 points) There are seven boys and six girls. Coach wants to select.pdf
 
(2ab)5.pdf
(2ab)5.pdf(2ab)5.pdf
(2ab)5.pdf
 
(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf
(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf
(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf
 
(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf
(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf
(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf
 
(10 points) Construct a BST by inserting the following keys into an .pdf
(10 points) Construct a BST by inserting the following keys into an .pdf(10 points) Construct a BST by inserting the following keys into an .pdf
(10 points) Construct a BST by inserting the following keys into an .pdf
 
#2 Listed below are the numbers of triplets born in a country each y.pdf
#2 Listed below are the numbers of triplets born in a country each y.pdf#2 Listed below are the numbers of triplets born in a country each y.pdf
#2 Listed below are the numbers of triplets born in a country each y.pdf
 
#52 In a large American university in 1969, the male and female pro.pdf
#52 In a large American university in 1969, the male and female pro.pdf#52 In a large American university in 1969, the male and female pro.pdf
#52 In a large American university in 1969, the male and female pro.pdf
 
#define LOGFILE signal_log.txt Signal handlers void sigusr1.pdf
#define LOGFILE signal_log.txt  Signal handlers void sigusr1.pdf#define LOGFILE signal_log.txt  Signal handlers void sigusr1.pdf
#define LOGFILE signal_log.txt Signal handlers void sigusr1.pdf
 
�Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf
 �Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf �Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf
�Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf
 
�derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf
 �derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf �derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf
�derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf
 
�Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf
 �Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf �Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf
�Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf
 
�Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf
 �Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf �Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf
�Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf
 
�Cu�l de los siguientes se considera un indicador principal de la e.pdf
 �Cu�l de los siguientes se considera un indicador principal de la e.pdf �Cu�l de los siguientes se considera un indicador principal de la e.pdf
�Cu�l de los siguientes se considera un indicador principal de la e.pdf
 

Recently uploaded

How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 

Recently uploaded (20)

How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 

#include iostream #include vector #include string using namesp.pdf

  • 1. #include #include #include using namespace std; class Point { public: Point(int x, int y) : m_x(x), m_y(y) {} int getX() const { return m_x; } int getY() const { return m_y; } private: int m_x, m_y; }; class Shape { public: Shape(const string& name, const Point& p) : m_name(name), m_point(p) {} virtual ~Shape() {} virtual void draw() const = 0; virtual void print() const { cout << "Shape: " << m_name << " (" << m_point.getX() << "," << m_point.getY() << ")" << endl; } private: string m_name; Point m_point; }; class OneD : public Shape { public: OneD(const string& name, const Point& p1, const Point& p2) : Shape(name, p1), m_p2(p2) {} void draw() const override {} void print() const override { Shape::print(); cout << " Point2: (" << m_p2.getX() << "," << m_p2.getY() << ")" << endl; } private: Point m_p2; }; class TwoD : public Shape { public: TwoD(const string& name, const Point& p) : Shape(name, p) {} void draw() const override {} }; class ThreeD : public Shape { public: ThreeD(const string& name, const Point& p) : Shape(name, p) {} void draw() const override {} }; class Line : public OneD { public: Line(const string& name, const Point& p1, const Point& p2) : OneD(name, p1, p2) {} void draw() const override {} }; class Curve : public OneD { public: Curve(const string& name, const Point& p1, const Point& p2, const Point& p3) : OneD(name, p1, p2), m_p3(p3) {} void draw() const override {} void print() const override { OneD::print(); cout << " Point3: (" << m_p3.getX() << "," << m_p3.getY() << ")" << endl; } private: Point m_p3; }; class Circle : public TwoD { public: Circle(const string& name, const Point& p, double radius) : TwoD(name, p), m_radius(radius) {} void draw() const override {} void print() const override { TwoD::print(); cout << " Radius: " << m_radius << endl; } private: double m_radius; }; class Rectangle : public TwoD { public: Rectangle(const string& name, const Point& p1, const Point& p2) : TwoD(name, p1), m_p2(p2) {} void draw() const override {} void print() const override { TwoD::print(); cout << " Point2: (" << m_p2.getX() << "," << m_p2.getY() << ")" << endl; } private: Point m_p2; }; class Sphere : public ThreeD { public: Sphere(const string& name, const Point& p, double radius) : ThreeD(name, p), m_radius(radius) {} void draw() const override {} void print() const override { ThreeD::print(); cout << " Radius: " << m_radius << endl; } private Errors I am getting. Please fix.