Question: i need UML and python Write a Python program parent class that represents a Menu item, with attributes: name, price, and category to which to
Write a Python program parent class that represents a "Menu" item, with attributes: name, price, and category to which to which it belongs. Types of (subclasses) for the Menu class are: Food and Drink. Food class should also have an attribute called calories and the Drink class should have an attribute called size. Size can be small, medium, large (Use an Enum class for Size). First draw a UML to represent the given problem. Then, using python to create the base class (superclass) and subclasses to represent the problem. Write a separate test module where 2 instances of each sub class are created, and the methods are tested by giving the required details and printing the details for each class. Hardcode the input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
