Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java programming please help.. java 2 waiting please.. C Get Homework Help With Chegg ~ | + 1URfavaSQej9vZD21ca TaBGyfNyevF7Ow/view Part I: Composition, Inheritance, Polymorphism, Abstract
java programming
please help..
java 2
waiting please..
C Get Homework Help With Chegg ~ | + 1URfavaSQej9vZD21ca TaBGyfNyevF7Ow/view Part I: Composition, Inheritance, Polymorphism, Abstract Classes and Interfaces Question 1 [40 pts] Implement the below classes and interface as presented in the following UML diagram except the class Fighter for which you will find the code provided below. For all classes implement only the getters that you will need later in your code. > Comparable + compare Too:E).int Aircraft - speed: double + Aircraft(speed: double) +toString():String + allowedWeight(): double Fleet - aircrafts: Aircraft[:] + Fleet(size: int) + addAircraft (a: Aircraft): void + aircraftAt(ind:int): Aircraft +fastestAircraft(): Aircraft I 1 Fighter -arming Weight: double +Fighter(speed:double, armingWeightdouble) +toString():String CivilAircraft -capacity: int +CivilAircraft(speed double capacity.int ) | +toString(): String A. [6 pts] Write the abstract class Aircraft as presented in the above UML. a) Write the constructor. b) Write the toString() method. c) Write the abstract method allowedWeight(). B. Do not implement the class Fighter. The code is: C Get Homework Help With Chegg x + /1URfavaSQej9vZD21 ca TaBGyfNyevF7Ow/view Question 2 [20 points] Implement the driver class (application) as follows: a) Create a Fleet object, 2 fighters, and 3 civil aircrafts. Add the fighters and the civil aircrafts to the fleet. b) Write code to compare the civil aircrafts to display a message showing which one has the larger allowed weight c) Write code to find and display the fastest aircraft in the fleet. d) Ask the user to enter an index then display the aircraft in the fleet at this index otherwise display an error message. Page 3 of 5 Fall 2020 - 2021 3 5 CSCI300 Final Exam Page Part II: ArrayList and Inheritance [40 points] + ..d X Get Homework Help With Chegg + d/1URfavaSQej9vZD21ca TaBGyfNyevF7Ow/view Part II: ArrayList and Inheritance [40 points] Question 1 (20 points] Implement the class Vehicle only. The code of the classes Bicycle and Car is provided below. Vehicle #brand: String #model: String #price: double #checkin: ArrayListStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started