java question, be detailed and have clear explanation. will givethumbs up rating if solved in 20 minutes Answer the following: a. The following code tries to exemplify inheritance in Java, but...


java question, be detailed and have clear explanation. will give thumbs up rating if solved in 20 minutes


Answer the following: a. The following code tries to exemplify inheritance in Java, but something is wrong. Identiy and explan the improper use a inheritance in the following code. b. How would you convert this code for proper use of Java inheritance? class FixedWing { public void fly() { System.out.println(" -- A fixed-wing aircraft flies (forward motion only)." } class Rotary Wing ( public void levitate() { System.out.printin(". -- A rotary-wing aircraft is able to take off vertically and hover. "); dass Osprey extends Rotary Wing, FixedWing { pulie veid goAirbome) System.out printir "The Osprey first levitates..") hover.); } class Osprey extends RotaryWing, FixedWing f public void goAirborne) { System.out.println("The Osprey first levitates ..."); super.levitate); System.out.println("then it starts flying. "); super.fly(); } } class AircraftTest public static void main(String] args) { Osprey myOsprey myOsprey.goAirborne(); } } new Osprey0;

May 17, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here