Question: Geometric Shapes Classes -Python(ver2.7) Geometric shapes can be modeled as classes. Develop classes for line segments, circles, and rectangles. Each shape object should contain a
Geometric Shapes Classes -Python(ver2.7)
Geometric shapes can be modeled as classes. Develop classes for line segments, circles, and rectangles.
Each shape object should contain a Turtle object and a color that allow the shape to be drawn in a Turtle graphic window.
Factor the code for these features (instance variables and methods) into an abstract Shape class.
The Circle, Rectangle, and Line classes are all subclasses of Shape.
These subclasses include the other information about the specific types of shapes, such as a radius or a corner point and a draw method. Write a script (main function) that uses several instances of the different shape classes to draw a house and a stick figure.
ADDITIONAL REQUIREMENTS:
When you write your program, be sure to use:
meaningful variable names with good style (i.e., useCamelCase or use_underscores)
docstring comments at the start of the program and after the definition of each function which describing what they do
a main function (see lab4 Part C) located at the top of program with a call to it at the bottom of the file to start execution
global constants where appropriate with good style (ALL_CAPS_AND_UNDERSCORES).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
