(Solved) : Q1 Write Java Code Implement Uml Diagram Note Following Italic Classes Abstract B Need In Q44044931 . . .
Java: UML design, write interfaces and abstract class help?

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) Don’t 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 don’t 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>> Comparable <<interface>> Flyable +howToFly(): String <<interface>> Cloneable Vehicle Bird +year:int +age: int 4 Car Dove Train Plane Penguin +Car(year:int) +Doveage:int) Copter Boing777 Q2. Write a test program to: a) Create an array of cars and sort them using Arrays.sort(). • Can we sort objects of the other classes using the same technique? b) Create a dove and clone it. Try to change the age attribute for one dove and see if it changes in the cloned dove. Show transcribed image text 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) Don’t 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 don’t 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. Comparable Flyable +howToFly(): String Cloneable Vehicle Bird +year:int +age: int 4 Car Dove Train Plane Penguin +Car(year:int) +Doveage:int) Copter Boing777 Q2. Write a test program to: a) Create an array of cars and sort them using Arrays.sort(). • Can we sort objects of the other classes using the same technique? b) Create a dove and clone it. Try to change the age attribute for one dove and see if it changes in the cloned dove.
Expert Answer
Answer to Q1. Write Java code to implement the UML diagram below. Note the following: a) All italic classes are abstract. b) No ne…
OR