Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Tea class The Tea.py file will contain the class definition of a tea drink. Since a tea IS - A drink, it should inherit the
Tea class
The Tea.py file will contain the class definition of a tea drink. Since a tea ISA drink, it should inherit the values we defined in the Drink class.
Your Tea class definition should support the following constructor and method:
initself size, price, style constructor that extends the parent classDrink constructor and sets the style of tea for example, Camomile, Mint, English Breakfast, etc. as an attribute to the Tea class.
Note, you may assume the style parameter is a str
In order to avoid code duplication, you must explicitly utilize the base class constructor to set the size and price attributes.
infoself method should override the inherited info method in the Drink class, and returns a str with the properties of a Tea object.
In order to avoid code duplication, you must explicitly utilize the base class info method to construct the Tea objects information.
An example of what the return string format of the info method is shown below:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started