CS110 HW5 solution

CS110: Introduction to Computing
Spring 2015, Tue/Thu, 5:30 PM – 6:45 PM
Instructor: Pejman Ghorbanzade
Assignment 5
Release Date: Apr 19, 2015 at 00:00 AM
Due Date: Apr 30, 2015 at 05:30 PM
Question 1
Write a program FlightTest.java that controls two airplanes, one plane1
a commercial plane from Eagle company and one plane2, a ghter-bomber
from Dragon company. All airplanes y at some altitude and with some
speed. They take o and land. Just as bombers may drop bomb (if they
have any) while they are in sky, commercials can board passengers (as much
as their capacity allows) while grounded.
Assuming all planes made by Eagle have 300 seats, y at 39000 ft and 550
mph and all planes made by Dragon have 2 bomb bays and y at 30000 ft
and 1000 mph, develop classes Aircraft, Bomber, Commercial, Eagle and
Dragon and use them in a program FlightTest.java.
Question 2
Your manager has just learned basic concepts of interfaces and abstraction in
Java and has asked you to implement the methods in the following interface
i

Leave a Reply

Your email address will not be published. Required fields are marked *