Question: This is by python Implement the following class diagrams and write a main class to test all these classes. Each class implement the display method

This is by pythonThis is by python Implement the following class diagrams and write a

Implement the following class diagrams and write a main class to test all these classes. Each class implement the display method of Displayable abstract class and the method should display all the current objects and its superclass objects information. Keep in mind, you should avoid code redundancy. Define appropriate __init__ method so that all the objects can be created properly. Define appropriate getters and setters using @property if needed for other classes methods. However, do not add any public property or get method for the private attribute parts in the Machine class.

Question Implement the following class diagrams and write a main class to test all these classes. Each class implement the display method of Displayable abstract class and the method should display all the current object's and its superclass object's information. Keep in mind, you should avoid code redundancy. Define appropriate _init_method so that all the objects can be created properly. Define appropriate getters and setters using @property if needed for other classes' methods. However, do not add any public property or get method for the private attribute 'parts' in the Machine class. Flyable (Abstract Class) Movable (Abstract Class) Displayable (Abstract Class) + fly() = 0: None + move() = 0: None + display() = 0: None Machine (Abstract class) Part _partNo: str price : float _init__(self, partNo, price) _machineName : str parts : list / the list may have duplicates */ _init__(self, machineName) + do Work() = 0: None + addPart(part): None + removePart(partNo): None + find DuplicatedPart(): Dictionary: sint, int> /* get a dctionary of duplicated partNo and their occurrences / MovablePart JetFighter _type: str _init__(self, partNo, price, type) + move(): None model : str speed : int _init__(self, model, speed) + flyo : None Robot cpu: str + _init__(self, machineName, cpu, model, speed) +getExpensive Parts(double priceLimit) : list /* get an array of parts that are over the priceLimit */ + getMovablePartsByType() : Dictionary > *get a dictionary of list of movable parts by type*/ + fly0: None + doWork() Page 1 of 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!