This will be a 3-part script project. Follow the guidelines below: First script will be named as circle.py. Create a class named Circle. Input an attribute as radius. Determine the code that must execute (Method/Function) circ_area which will compute for the area and circ_circum which will compute the circumference of a circle. Second script will be named as rect.py. Create a class named Rect. Input an attribute as length & width. Determine the code that must execute (Method/Function) rect_area which will compute for the area and rect_perim which will compute the perimeter of a rectangle. Third script will be named as geometry.py. You will import class Circle and class Rect from their respective scripts to this main script. Create a logical code that will display: 1. The total area of a circle and a rectangle. 2. The circumference of a circle. 3. The perimeter of a rectangle.
This will be a 3-part script project. Follow the guidelines below: First script will be named as circle.py. Create a class named Circle. Input an attribute as radius. Determine the code that must execute (Method/Function) circ_area which will compute for the area and circ_circum which will compute the circumference of a circle. Second script will be named as rect.py. Create a class named Rect. Input an attribute as length & width. Determine the code that must execute (Method/Function) rect_area which will compute for the area and rect_perim which will compute the perimeter of a rectangle. Third script will be named as geometry.py. You will import class Circle and class Rect from their respective scripts to this main script. Create a logical code that will display: 1. The total area of a circle and a rectangle. 2. The circumference of a circle. 3. The perimeter of a rectangle.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 2E
Related questions
Question
PYTHON
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT