Question: ArrayList and Files. Implement a Java program that makes use of files and fulfills the requirements shown below. 1. From your previous assignment, a file

ArrayList and Files. Implement a Java program that makes use of files and fulfills the requirements shown below.

1. From your previous assignment, a file called aircraft.dat was received and was processed. The program opened a file with the following information and displayed it to the screen:

-Name

-Maximum cruise speed (in km/h)

-Wing span and length (in m)

-Type (M for military, C for civilian)

-Description

2)Each of the data was read in the following way:

-Name as a String

-Maximum cruise speed as a double

-Wing span as double

-Length as double

-Type as char

-Description as String

* For this assignment, you will design a class called Aircraft with the information found in the file, a default constructor, an overloaded constructor, a copy constructor, all setters and getters

-Your aircraft class should implement the following methods:

-toString()

-equals(Aircraft ac)

-When reading data from the file, create objects of type Aircraft and add them to an ArrayList.

-Design a menu that allows you to add an aircraft, show the information of all aircrafts and delete a specific aircraft (by index). A fourth option exits the program and saves all data from the ArrayList to the same file.

---------------------------------------------------------------------------------------------------------------------------------------------------------------

First Assigment code and file photos:

ArrayList and Files. Implement a Java program that makes use of filesand fulfills the requirements shown below. 1. From your previous assignment, a

aircraft(2) - Notepad Fil ii Fonai Vic lelpp SR-71 Blackbird 3500 16.95 32.74 M high-speed strategic reconnaissance EF-111A Raven 2280 19.21 23.16M electronic warfare Concorde 2140 25.61 62.2 C supersonic airliner aircraft(2) - Notepad Fil ii Fonai Vic lelpp SR-71 Blackbird 3500 16.95 32.74 M high-speed strategic reconnaissance EF-111A Raven 2280 19.21 23.16M electronic warfare Concorde 2140 25.61 62.2 C supersonic airliner

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!