1. Engineering
  2. Computer Science
  3. java object orientated programming...

Question: java object orientated programming...

Question details

Q1. Write Java code to implement the UML diagram below. Note the following: a) All italic classes are abstract. b) No need to include any method except those you have to include. c) The howToFly () method should print one line describing how an object flies. For example, a Copter will fly off the ground vertically using rotor blades. d) Dont implement howToFly) in the Plane class (as it will make little sense because subclasses fly differently). Instead, implement howToFly () in both Copter and Boing777. e) Cars are comparable based on their manufacturing year. f) You dont have to write the body of all classes (e.g. Train would be an empty class), but feel free to adjust the design and add any class members of your choice. <<interface>> Flyable +howToFly(): String <<interface»> <<interface>> Cloneable Comparable Vehicle Bird tyear:int tage: int Car Dove Train Plane Penguin +Car(year:int) +Dove(age:int) Copter Boing777Java object orientated programming.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution