SlideShare une entreprise Scribd logo
1  sur  2
Télécharger pour lire hors ligne
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.

Contenu connexe

Similaire à 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
 

Similaire à 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
 

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

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

Dernier

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
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
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 

Dernier (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
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
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

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.