Question: Objectives: This assignment will give you the opportunity to use input and output functionality inside java. When using input and output functions, you will also
Objectives: This assignment will give you the opportunity to use input and output functionality inside java. When using input and output functions, you will also need to know exceptions and loops. On top of this, you will use Arrays and Array Lists are both used in java. Using one or the other can be beneficial between what tasks you are trying to achieve. After completing this assignment, students will be able to:
Importing values from a text file
Using for and while loops
Exporting data to a text file
Using Exceptions trycatch
Declare an Array and Array List
Implement storage of data into Array and Array List
Managing data in an Array and Array List
Task Description: A flight company has hired you to create a program that tracks a plane's mileage covered. The company will give you multiple text files with lines of mileage for different planes identified by a number Plane#txt These files are given in a directory data You should read the file and insert these values into an ArrayList. You should then convert these values into the following measurements: kilometers, centimeters, inches, and feet. Store these values in their own Arrays. You should write the values of the conversions into "Plane#Convertedtxt "Plane#Convertedtxt will contain separate lists with the input data converted into kilometers, centimeters, inches, and feet. These values should be written with decimal places. All output files should be written to an output directory named converted. Your solution must create the output files, but it need not create the output directory. If you choose not to handle creating the output directory then you should include an empty output directory in your submission.
Your program should work for any amount of given input files any number of planes in the given data directory.
Conversion Factors:
Inches in Mile
Feet in Mile
Kilometers in Mile
Centimeters in Mile
Note that the input values are stored in an ArrayList and the conversions are stored in Arrays. You should make sure to maintain precision when converting the input data.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
