SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Downloaden Sie, um offline zu lesen
Start your work by implementing the ComplexShape class which is a child class of the
GeometricShape class. The name attribute of the GeometricShape parent should be set to
'ComplexShape' during the object initialization.
The ComplexShape class should have the following private attributes with the associated getter
and setter methods:
base: The base shape of the complex shape. This is expected to be any child of GeometricShape
(i.e., Rectangle, Ellipse, Square, or Circle). However, you do not have to worry about argument
validation.
holes: The list of holes in the complex shape. This is expected to be a list of GeometricShape's
child objects. Again, you do not have to worry about argument validation.
The expected behavior:
Furthermore, the ComplexShape class should have the following public methods:
add_hole: This method with a single hole argument should add the hole to the end of the list of
holes. The hole argument should be a child of GeometricShape.
remove_hole: This method with a single hole argument should remove the hole from the list of
holes. The hole argument should be a child of GeometricShape.
Do not worry about the situation when the hole is not present in the list of holes. You will not be
graded on the method's behavior in such a situation.
get_area: This method should return the area of the complex shape. The area of the complex
shape is the area of the base shape minus the area of all holes.
get_edge_length: This method should return the total edge length of the complex shape. The
edge length of the complex shape is the edge length of the base shape plus the edge length of all
holes.
As suggested above, do not worry about argument validation in this task.
Utilize the Classes
Finally, let's observe how we can utilize the implemented classes in our code.
First, create a new shapes_example.py file in your project directory.
Second, assign the following variables in the shapes_example.py file:
rectangle: A Rectangle object with length set to 10 and width to 20.
ellipse: An Ellipse object with semi_major_axis set to 9 and semi_minor_axis to 7.
square: A Square object with side set to 4.
circle: A Circle object with radius set to 20.
complex_shape: A ComplexShape object with base set to circle and holes set to [rectangle,
ellipse, square].
complex_shape_area: The area of complex_shape.
complex_shape_edge_length: The edge length of complex_shape. In this task, you are going to
implement one additional class, ComplexShape, in your geometric_shapes. py file. This class
will be used to represent a complex shape, which utilizes several geometric shapes. There is
always a base which represents the overall shape of the complex shape. Then, there are zeros or
more additional shapes that represent holes in the base. The Figure below shows an example of a
complex shape with an ellipse base and three holes.

Weitere ähnliche Inhalte

Ähnlich wie Start your work by implementing the ComplexShape class which is a .pdf

The Ring programming language version 1.9 book - Part 84 of 210
The Ring programming language version 1.9 book - Part 84 of 210The Ring programming language version 1.9 book - Part 84 of 210
The Ring programming language version 1.9 book - Part 84 of 210Mahmoud Samir Fayed
 
Pi j2.3 objects
Pi j2.3 objectsPi j2.3 objects
Pi j2.3 objectsmcollison
 
CSC139 Chapter 10 Lab Assignment (2)PolymorphismObjectivesIn.docx
CSC139 Chapter 10 Lab Assignment (2)PolymorphismObjectivesIn.docxCSC139 Chapter 10 Lab Assignment (2)PolymorphismObjectivesIn.docx
CSC139 Chapter 10 Lab Assignment (2)PolymorphismObjectivesIn.docxfaithxdunce63732
 
CIS 1403 lab 3 functions and methods in Java
CIS 1403 lab 3 functions and methods in JavaCIS 1403 lab 3 functions and methods in Java
CIS 1403 lab 3 functions and methods in JavaHamad Odhabi
 
exercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdfexercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdfenodani2008
 
Class and Object.pptx
Class and Object.pptxClass and Object.pptx
Class and Object.pptxHailsh
 
The Ring programming language version 1.7 book - Part 78 of 196
The Ring programming language version 1.7 book - Part 78 of 196The Ring programming language version 1.7 book - Part 78 of 196
The Ring programming language version 1.7 book - Part 78 of 196Mahmoud Samir Fayed
 
Exercise1[5points]Create the following classe
Exercise1[5points]Create the following classeExercise1[5points]Create the following classe
Exercise1[5points]Create the following classemecklenburgstrelitzh
 
The Ring programming language version 1.6 book - Part 75 of 189
The Ring programming language version 1.6 book - Part 75 of 189The Ring programming language version 1.6 book - Part 75 of 189
The Ring programming language version 1.6 book - Part 75 of 189Mahmoud Samir Fayed
 
1- Create a class called Point that has two instance variables, defi.pdf
1- Create a class called Point that has two instance variables, defi.pdf1- Create a class called Point that has two instance variables, defi.pdf
1- Create a class called Point that has two instance variables, defi.pdfjeeteshmalani1
 
The Ring programming language version 1.7 book - Part 77 of 196
The Ring programming language version 1.7 book - Part 77 of 196The Ring programming language version 1.7 book - Part 77 of 196
The Ring programming language version 1.7 book - Part 77 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.5.4 book - Part 74 of 185
The Ring programming language version 1.5.4 book - Part 74 of 185The Ring programming language version 1.5.4 book - Part 74 of 185
The Ring programming language version 1.5.4 book - Part 74 of 185Mahmoud Samir Fayed
 
Presentation 3rd
Presentation 3rdPresentation 3rd
Presentation 3rdConnex
 
The Ring programming language version 1.10 book - Part 85 of 212
The Ring programming language version 1.10 book - Part 85 of 212The Ring programming language version 1.10 book - Part 85 of 212
The Ring programming language version 1.10 book - Part 85 of 212Mahmoud Samir Fayed
 
Assessments
AssessmentsAssessments
Assessmentshccit
 
The Ring programming language version 1.5.1 book - Part 69 of 180
The Ring programming language version 1.5.1 book - Part 69 of 180The Ring programming language version 1.5.1 book - Part 69 of 180
The Ring programming language version 1.5.1 book - Part 69 of 180Mahmoud Samir Fayed
 
Java 2 chapter 10 - basic oop in java
Java 2   chapter 10 - basic oop in javaJava 2   chapter 10 - basic oop in java
Java 2 chapter 10 - basic oop in javalet's go to study
 

Ähnlich wie Start your work by implementing the ComplexShape class which is a .pdf (20)

The Ring programming language version 1.9 book - Part 84 of 210
The Ring programming language version 1.9 book - Part 84 of 210The Ring programming language version 1.9 book - Part 84 of 210
The Ring programming language version 1.9 book - Part 84 of 210
 
Pi j2.3 objects
Pi j2.3 objectsPi j2.3 objects
Pi j2.3 objects
 
CSC139 Chapter 10 Lab Assignment (2)PolymorphismObjectivesIn.docx
CSC139 Chapter 10 Lab Assignment (2)PolymorphismObjectivesIn.docxCSC139 Chapter 10 Lab Assignment (2)PolymorphismObjectivesIn.docx
CSC139 Chapter 10 Lab Assignment (2)PolymorphismObjectivesIn.docx
 
Module 3 Class and Object.ppt
Module 3 Class and Object.pptModule 3 Class and Object.ppt
Module 3 Class and Object.ppt
 
CIS 1403 lab 3 functions and methods in Java
CIS 1403 lab 3 functions and methods in JavaCIS 1403 lab 3 functions and methods in Java
CIS 1403 lab 3 functions and methods in Java
 
exercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdfexercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdf
 
Class and Object.pptx
Class and Object.pptxClass and Object.pptx
Class and Object.pptx
 
The Ring programming language version 1.7 book - Part 78 of 196
The Ring programming language version 1.7 book - Part 78 of 196The Ring programming language version 1.7 book - Part 78 of 196
The Ring programming language version 1.7 book - Part 78 of 196
 
Exercise1[5points]Create the following classe
Exercise1[5points]Create the following classeExercise1[5points]Create the following classe
Exercise1[5points]Create the following classe
 
The Ring programming language version 1.6 book - Part 75 of 189
The Ring programming language version 1.6 book - Part 75 of 189The Ring programming language version 1.6 book - Part 75 of 189
The Ring programming language version 1.6 book - Part 75 of 189
 
1- Create a class called Point that has two instance variables, defi.pdf
1- Create a class called Point that has two instance variables, defi.pdf1- Create a class called Point that has two instance variables, defi.pdf
1- Create a class called Point that has two instance variables, defi.pdf
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
The Ring programming language version 1.7 book - Part 77 of 196
The Ring programming language version 1.7 book - Part 77 of 196The Ring programming language version 1.7 book - Part 77 of 196
The Ring programming language version 1.7 book - Part 77 of 196
 
The Ring programming language version 1.5.4 book - Part 74 of 185
The Ring programming language version 1.5.4 book - Part 74 of 185The Ring programming language version 1.5.4 book - Part 74 of 185
The Ring programming language version 1.5.4 book - Part 74 of 185
 
Presentation 3rd
Presentation 3rdPresentation 3rd
Presentation 3rd
 
The Ring programming language version 1.10 book - Part 85 of 212
The Ring programming language version 1.10 book - Part 85 of 212The Ring programming language version 1.10 book - Part 85 of 212
The Ring programming language version 1.10 book - Part 85 of 212
 
Assessments
AssessmentsAssessments
Assessments
 
The Ring programming language version 1.5.1 book - Part 69 of 180
The Ring programming language version 1.5.1 book - Part 69 of 180The Ring programming language version 1.5.1 book - Part 69 of 180
The Ring programming language version 1.5.1 book - Part 69 of 180
 
Java 2 chapter 10 - basic oop in java
Java 2   chapter 10 - basic oop in javaJava 2   chapter 10 - basic oop in java
Java 2 chapter 10 - basic oop in java
 
Imp_Points_Scala
Imp_Points_ScalaImp_Points_Scala
Imp_Points_Scala
 

Mehr von suresh888298

Suppose the government cuts taxes. Using the long-run model of a sma.pdf
Suppose the government cuts taxes. Using the long-run model of a sma.pdfSuppose the government cuts taxes. Using the long-run model of a sma.pdf
Suppose the government cuts taxes. Using the long-run model of a sma.pdfsuresh888298
 
Suppose that this course has 50 students. There are 35 IT majors and.pdf
Suppose that this course has 50 students. There are 35 IT majors and.pdfSuppose that this course has 50 students. There are 35 IT majors and.pdf
Suppose that this course has 50 students. There are 35 IT majors and.pdfsuresh888298
 
Suppose that GDP production function of the United States has the fo.pdf
Suppose that GDP production function of the United States has the fo.pdfSuppose that GDP production function of the United States has the fo.pdf
Suppose that GDP production function of the United States has the fo.pdfsuresh888298
 
Suppose inflation rates in the US and Spain are expected to be 4.66.pdf
Suppose inflation rates in the US and Spain are expected to be 4.66.pdfSuppose inflation rates in the US and Spain are expected to be 4.66.pdf
Suppose inflation rates in the US and Spain are expected to be 4.66.pdfsuresh888298
 
Suppose a potter has 11 choices of glazes to apply on her pottery. S.pdf
Suppose a potter has 11 choices of glazes to apply on her pottery. S.pdfSuppose a potter has 11 choices of glazes to apply on her pottery. S.pdf
Suppose a potter has 11 choices of glazes to apply on her pottery. S.pdfsuresh888298
 
Sunset Board currently pays out 40 of net income as dividends to Ta.pdf
Sunset Board currently pays out 40 of net income as dividends to Ta.pdfSunset Board currently pays out 40 of net income as dividends to Ta.pdf
Sunset Board currently pays out 40 of net income as dividends to Ta.pdfsuresh888298
 
Subject - AICombine all searches of both informed and uninformed.pdf
Subject - AICombine all searches of both informed and uninformed.pdfSubject - AICombine all searches of both informed and uninformed.pdf
Subject - AICombine all searches of both informed and uninformed.pdfsuresh888298
 
Su codirector, Carl, le pide que eche un vistazo a su informe sobre .pdf
Su codirector, Carl, le pide que eche un vistazo a su informe sobre .pdfSu codirector, Carl, le pide que eche un vistazo a su informe sobre .pdf
Su codirector, Carl, le pide que eche un vistazo a su informe sobre .pdfsuresh888298
 
Su inversi�n en la universidad es un ejemplo de c�mo construir cu�l .pdf
Su inversi�n en la universidad es un ejemplo de c�mo construir cu�l .pdfSu inversi�n en la universidad es un ejemplo de c�mo construir cu�l .pdf
Su inversi�n en la universidad es un ejemplo de c�mo construir cu�l .pdfsuresh888298
 
Structured Pty. Ltd., a small business entity, has prepared the foll.pdf
Structured Pty. Ltd., a small business entity, has prepared the foll.pdfStructured Pty. Ltd., a small business entity, has prepared the foll.pdf
Structured Pty. Ltd., a small business entity, has prepared the foll.pdfsuresh888298
 
SORU 8 01 puan (kademeli) 45 yanda bir kadn bir haberde izofr.pdf
SORU 8 01 puan (kademeli) 45 yanda bir kadn bir haberde izofr.pdfSORU 8 01 puan (kademeli) 45 yanda bir kadn bir haberde izofr.pdf
SORU 8 01 puan (kademeli) 45 yanda bir kadn bir haberde izofr.pdfsuresh888298
 
statement of owner equity An alphabetical list of Ivanhoe Com.pdf
statement of owner equity  An alphabetical list of Ivanhoe Com.pdfstatement of owner equity  An alphabetical list of Ivanhoe Com.pdf
statement of owner equity An alphabetical list of Ivanhoe Com.pdfsuresh888298
 
Stephen Denningden aadaki alnty okuyun Bug�nlerde, komuta ve kon.pdf
Stephen Denningden aadaki alnty okuyun Bug�nlerde, komuta ve kon.pdfStephen Denningden aadaki alnty okuyun Bug�nlerde, komuta ve kon.pdf
Stephen Denningden aadaki alnty okuyun Bug�nlerde, komuta ve kon.pdfsuresh888298
 
Stans Market, yakn zamanda yaplan bir envanter almn i�eren aadaki o.pdf
Stans Market, yakn zamanda yaplan bir envanter almn i�eren aadaki o.pdfStans Market, yakn zamanda yaplan bir envanter almn i�eren aadaki o.pdf
Stans Market, yakn zamanda yaplan bir envanter almn i�eren aadaki o.pdfsuresh888298
 
Stans Market registr� los siguientes eventos relacionados con una c.pdf
Stans Market registr� los siguientes eventos relacionados con una c.pdfStans Market registr� los siguientes eventos relacionados con una c.pdf
Stans Market registr� los siguientes eventos relacionados con una c.pdfsuresh888298
 
SQLite9. Write a query that returns the data for the employe.pdf
SQLite9. Write a query that returns the data for the employe.pdfSQLite9. Write a query that returns the data for the employe.pdf
SQLite9. Write a query that returns the data for the employe.pdfsuresh888298
 
Soru Endonezya ve �inin ticaret ortaklar olduunu varsayalm. Endo.pdf
Soru Endonezya ve �inin ticaret ortaklar olduunu varsayalm. Endo.pdfSoru Endonezya ve �inin ticaret ortaklar olduunu varsayalm. Endo.pdf
Soru Endonezya ve �inin ticaret ortaklar olduunu varsayalm. Endo.pdfsuresh888298
 
Soru 19 Bu soruyu iaretleMassachusettsteki s�m�rgeciler, stokla.pdf
Soru 19 Bu soruyu iaretleMassachusettsteki s�m�rgeciler, stokla.pdfSoru 19 Bu soruyu iaretleMassachusettsteki s�m�rgeciler, stokla.pdf
Soru 19 Bu soruyu iaretleMassachusettsteki s�m�rgeciler, stokla.pdfsuresh888298
 
SORU 5 Toplumda kadna y�nelik tutumlarla ilgili aadaki ifadelerden h.pdf
SORU 5 Toplumda kadna y�nelik tutumlarla ilgili aadaki ifadelerden h.pdfSORU 5 Toplumda kadna y�nelik tutumlarla ilgili aadaki ifadelerden h.pdf
SORU 5 Toplumda kadna y�nelik tutumlarla ilgili aadaki ifadelerden h.pdfsuresh888298
 
SORU 9 Farkllama, bir organizasyonda ib�l�m�n�n kurulmas ve kontro.pdf
SORU 9 Farkllama, bir organizasyonda ib�l�m�n�n kurulmas ve kontro.pdfSORU 9 Farkllama, bir organizasyonda ib�l�m�n�n kurulmas ve kontro.pdf
SORU 9 Farkllama, bir organizasyonda ib�l�m�n�n kurulmas ve kontro.pdfsuresh888298
 

Mehr von suresh888298 (20)

Suppose the government cuts taxes. Using the long-run model of a sma.pdf
Suppose the government cuts taxes. Using the long-run model of a sma.pdfSuppose the government cuts taxes. Using the long-run model of a sma.pdf
Suppose the government cuts taxes. Using the long-run model of a sma.pdf
 
Suppose that this course has 50 students. There are 35 IT majors and.pdf
Suppose that this course has 50 students. There are 35 IT majors and.pdfSuppose that this course has 50 students. There are 35 IT majors and.pdf
Suppose that this course has 50 students. There are 35 IT majors and.pdf
 
Suppose that GDP production function of the United States has the fo.pdf
Suppose that GDP production function of the United States has the fo.pdfSuppose that GDP production function of the United States has the fo.pdf
Suppose that GDP production function of the United States has the fo.pdf
 
Suppose inflation rates in the US and Spain are expected to be 4.66.pdf
Suppose inflation rates in the US and Spain are expected to be 4.66.pdfSuppose inflation rates in the US and Spain are expected to be 4.66.pdf
Suppose inflation rates in the US and Spain are expected to be 4.66.pdf
 
Suppose a potter has 11 choices of glazes to apply on her pottery. S.pdf
Suppose a potter has 11 choices of glazes to apply on her pottery. S.pdfSuppose a potter has 11 choices of glazes to apply on her pottery. S.pdf
Suppose a potter has 11 choices of glazes to apply on her pottery. S.pdf
 
Sunset Board currently pays out 40 of net income as dividends to Ta.pdf
Sunset Board currently pays out 40 of net income as dividends to Ta.pdfSunset Board currently pays out 40 of net income as dividends to Ta.pdf
Sunset Board currently pays out 40 of net income as dividends to Ta.pdf
 
Subject - AICombine all searches of both informed and uninformed.pdf
Subject - AICombine all searches of both informed and uninformed.pdfSubject - AICombine all searches of both informed and uninformed.pdf
Subject - AICombine all searches of both informed and uninformed.pdf
 
Su codirector, Carl, le pide que eche un vistazo a su informe sobre .pdf
Su codirector, Carl, le pide que eche un vistazo a su informe sobre .pdfSu codirector, Carl, le pide que eche un vistazo a su informe sobre .pdf
Su codirector, Carl, le pide que eche un vistazo a su informe sobre .pdf
 
Su inversi�n en la universidad es un ejemplo de c�mo construir cu�l .pdf
Su inversi�n en la universidad es un ejemplo de c�mo construir cu�l .pdfSu inversi�n en la universidad es un ejemplo de c�mo construir cu�l .pdf
Su inversi�n en la universidad es un ejemplo de c�mo construir cu�l .pdf
 
Structured Pty. Ltd., a small business entity, has prepared the foll.pdf
Structured Pty. Ltd., a small business entity, has prepared the foll.pdfStructured Pty. Ltd., a small business entity, has prepared the foll.pdf
Structured Pty. Ltd., a small business entity, has prepared the foll.pdf
 
SORU 8 01 puan (kademeli) 45 yanda bir kadn bir haberde izofr.pdf
SORU 8 01 puan (kademeli) 45 yanda bir kadn bir haberde izofr.pdfSORU 8 01 puan (kademeli) 45 yanda bir kadn bir haberde izofr.pdf
SORU 8 01 puan (kademeli) 45 yanda bir kadn bir haberde izofr.pdf
 
statement of owner equity An alphabetical list of Ivanhoe Com.pdf
statement of owner equity  An alphabetical list of Ivanhoe Com.pdfstatement of owner equity  An alphabetical list of Ivanhoe Com.pdf
statement of owner equity An alphabetical list of Ivanhoe Com.pdf
 
Stephen Denningden aadaki alnty okuyun Bug�nlerde, komuta ve kon.pdf
Stephen Denningden aadaki alnty okuyun Bug�nlerde, komuta ve kon.pdfStephen Denningden aadaki alnty okuyun Bug�nlerde, komuta ve kon.pdf
Stephen Denningden aadaki alnty okuyun Bug�nlerde, komuta ve kon.pdf
 
Stans Market, yakn zamanda yaplan bir envanter almn i�eren aadaki o.pdf
Stans Market, yakn zamanda yaplan bir envanter almn i�eren aadaki o.pdfStans Market, yakn zamanda yaplan bir envanter almn i�eren aadaki o.pdf
Stans Market, yakn zamanda yaplan bir envanter almn i�eren aadaki o.pdf
 
Stans Market registr� los siguientes eventos relacionados con una c.pdf
Stans Market registr� los siguientes eventos relacionados con una c.pdfStans Market registr� los siguientes eventos relacionados con una c.pdf
Stans Market registr� los siguientes eventos relacionados con una c.pdf
 
SQLite9. Write a query that returns the data for the employe.pdf
SQLite9. Write a query that returns the data for the employe.pdfSQLite9. Write a query that returns the data for the employe.pdf
SQLite9. Write a query that returns the data for the employe.pdf
 
Soru Endonezya ve �inin ticaret ortaklar olduunu varsayalm. Endo.pdf
Soru Endonezya ve �inin ticaret ortaklar olduunu varsayalm. Endo.pdfSoru Endonezya ve �inin ticaret ortaklar olduunu varsayalm. Endo.pdf
Soru Endonezya ve �inin ticaret ortaklar olduunu varsayalm. Endo.pdf
 
Soru 19 Bu soruyu iaretleMassachusettsteki s�m�rgeciler, stokla.pdf
Soru 19 Bu soruyu iaretleMassachusettsteki s�m�rgeciler, stokla.pdfSoru 19 Bu soruyu iaretleMassachusettsteki s�m�rgeciler, stokla.pdf
Soru 19 Bu soruyu iaretleMassachusettsteki s�m�rgeciler, stokla.pdf
 
SORU 5 Toplumda kadna y�nelik tutumlarla ilgili aadaki ifadelerden h.pdf
SORU 5 Toplumda kadna y�nelik tutumlarla ilgili aadaki ifadelerden h.pdfSORU 5 Toplumda kadna y�nelik tutumlarla ilgili aadaki ifadelerden h.pdf
SORU 5 Toplumda kadna y�nelik tutumlarla ilgili aadaki ifadelerden h.pdf
 
SORU 9 Farkllama, bir organizasyonda ib�l�m�n�n kurulmas ve kontro.pdf
SORU 9 Farkllama, bir organizasyonda ib�l�m�n�n kurulmas ve kontro.pdfSORU 9 Farkllama, bir organizasyonda ib�l�m�n�n kurulmas ve kontro.pdf
SORU 9 Farkllama, bir organizasyonda ib�l�m�n�n kurulmas ve kontro.pdf
 

Kürzlich hochgeladen

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
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxJanEmmanBrigoli
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
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.
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 

Kürzlich hochgeladen (20)

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
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
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...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 

Start your work by implementing the ComplexShape class which is a .pdf

  • 1. Start your work by implementing the ComplexShape class which is a child class of the GeometricShape class. The name attribute of the GeometricShape parent should be set to 'ComplexShape' during the object initialization. The ComplexShape class should have the following private attributes with the associated getter and setter methods: base: The base shape of the complex shape. This is expected to be any child of GeometricShape (i.e., Rectangle, Ellipse, Square, or Circle). However, you do not have to worry about argument validation. holes: The list of holes in the complex shape. This is expected to be a list of GeometricShape's child objects. Again, you do not have to worry about argument validation. The expected behavior: Furthermore, the ComplexShape class should have the following public methods: add_hole: This method with a single hole argument should add the hole to the end of the list of holes. The hole argument should be a child of GeometricShape. remove_hole: This method with a single hole argument should remove the hole from the list of holes. The hole argument should be a child of GeometricShape. Do not worry about the situation when the hole is not present in the list of holes. You will not be graded on the method's behavior in such a situation. get_area: This method should return the area of the complex shape. The area of the complex shape is the area of the base shape minus the area of all holes. get_edge_length: This method should return the total edge length of the complex shape. The edge length of the complex shape is the edge length of the base shape plus the edge length of all holes. As suggested above, do not worry about argument validation in this task. Utilize the Classes Finally, let's observe how we can utilize the implemented classes in our code. First, create a new shapes_example.py file in your project directory. Second, assign the following variables in the shapes_example.py file: rectangle: A Rectangle object with length set to 10 and width to 20. ellipse: An Ellipse object with semi_major_axis set to 9 and semi_minor_axis to 7. square: A Square object with side set to 4. circle: A Circle object with radius set to 20. complex_shape: A ComplexShape object with base set to circle and holes set to [rectangle, ellipse, square].
  • 2. complex_shape_area: The area of complex_shape. complex_shape_edge_length: The edge length of complex_shape. In this task, you are going to implement one additional class, ComplexShape, in your geometric_shapes. py file. This class will be used to represent a complex shape, which utilizes several geometric shapes. There is always a base which represents the overall shape of the complex shape. Then, there are zeros or more additional shapes that represent holes in the base. The Figure below shows an example of a complex shape with an ellipse base and three holes.