Answered step by step
Verified Expert Solution
Link Copied!

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 IS-A drink, it should inherit the values we defined in the Drink class.
Your Tea class definition should support the following constructor and method:
__init__(self, size, price, style)- constructor that extends the parent class(Drink) 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.
info(self)- 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions

Question

a former business major? MBA?

Answered: 1 week ago

Question

What is the environment we are trying to create?

Answered: 1 week ago