Question # 799
An Airplane is good if the following conditions are met.
- Number of words in the name should be greater than 1 and should start with "air".
- Average speed should be greater than 250 Km/hrs.
- Total distance covered by Airplane should be greater than 5000 Km.
- Passengers should be happy.
- Must have a specification “Baggage: 60 lbs (maximum)â€
Write a method:
boolean isGoodAirplane(String airplaneName, int averageSpeed, int distanceCovered, boolean isPassengerHappy, String[] specifications)
airplaneName | | the name of the AirPlane |
averageSpeed | | the Average speed of the plane in Km/hrs |
distanceCovered | | the total distance covered by the airPlane |
isPassengerHappy | | a boolean value that is true if the passengers are happy otherwise false that return true if Airplane is good otherwise false |
specifications | | Array of specifications in plane. Like Seats: 2, Baggage: 60 lbs (maximum), Fuel (Auto Gas or Av Gas): 20 gal, Range: 300 NM, etc.
|