class Instance Variables An array that stores Aircraft that represents Delta Airlines entire fleet A variable that represents the count for the number of aircraft in the fleet Methods Constructor-One constructor that instantiates the array and sets the count to zero readfile()-This method accepts a string that represents the name of the file to be read. It will then read the file. Once the data is read, it should create aircraft and then pass the vehicle to the addAircraft roethod. It should not allow any duplication of records. Be sure to handle all exceptions. writeFile()-This method accepts a string that represents the name of the file to be written to and then writes the contents of the array to a file. This method should call a sort method to sort the array before writing to it. sortArray) This method retures a sorted array. The array is sorted by registration number u addAircraft-This method accepts an aircraft and adds it to the fleet(the array only if it is not already in the list. displayfleet)-This method outputs all of the ships and shuttles that are in the fleet o display Maintenancelist()- This method outputs all aircraft in the array that currently require maintenance, either by miles or date. o displayNextMaintenancetist() This method outputs all aircraft in the fleet by name, manufacturer, model, next maintenance date, and next maintenance miles updateMiles) This method accepts a regNumber and miles and updates the total miles for the designated aircraft based on regNumber o update Maintenance()- This method accepts a regNumber and changes the lastMaintenance date to the current date and resets last maintenance mileage
class Instance Variables An array that stores Aircraft that represents Delta Airlines entire fleet A variable that represents the count for the number of aircraft in the fleet Methods Constructor-One constructor that instantiates the array and sets the count to zero readfile()-This method accepts a string that represents the name of the file to be read. It will then read the file. Once the data is read, it should create aircraft and then pass the vehicle to the addAircraft roethod. It should not allow any duplication of records. Be sure to handle all exceptions. writeFile()-This method accepts a string that represents the name of the file to be written to and then writes the contents of the array to a file. This method should call a sort method to sort the array before writing to it. sortArray) This method retures a sorted array. The array is sorted by registration number u addAircraft-This method accepts an aircraft and adds it to the fleet(the array only if it is not already in the list. displayfleet)-This method outputs all of the ships and shuttles that are in the fleet o display Maintenancelist()- This method outputs all aircraft in the array that currently require maintenance, either by miles or date. o displayNextMaintenancetist() This method outputs all aircraft in the fleet by name, manufacturer, model, next maintenance date, and next maintenance miles updateMiles) This method accepts a regNumber and miles and updates the total miles for the designated aircraft based on regNumber o update Maintenance()- This method accepts a regNumber and changes the lastMaintenance date to the current date and resets last maintenance mileage
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 5 images
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
Hello, is there a way that you can write the fleet class in java?
Solution
by Bartleby Expert
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT