Question
Solve the problem using Java programming language Problem: Darth Vader wants to check that his TIE fighter pilots are patrolling adequately-sized regions of the galaxy.
Solve the problem using Java programming language
Problem: Darth Vader wants to check that his TIE fighter pilots are patrolling adequately-sized regions of the galaxy. He has files of data that contain the patrol coordinates for each of his pilots. With the fear of being force choked, you have agreed to write a program that analyzes the data and determines the size of the area patrolled by the pilots. Details:
The area of the shape can be calculated with the following formula:
The vertices will be stored in a 3-dimensional array o The dimensions are 20 x 16 x 2 o The first dimension is pilot o The second dimension is coordinate o The third dimension is x or y value
A single dimension array will be needed to store pilot names The entire file will be read and stored in the appropriate array before performing calculations (-15 points) The maximum number of pilots is 20 The maximum number of coordinates on a line is 16 The last coordinate on the line will be the same as the first The program must have a least 3 functions. o At least 2 of the functions must be called from main Input: All input will come from a file named pilot_routes.txt. The file will contain the pilots first name followed by a list of coordinates separated by spaces. Each line in the file will represent a different pilot. The format for each line will be the pilots first name followed by a list of x and y coordinates. There will be a space between each pair of coordinates and a comma between the x and y coordinates. The first and last set of coordinates will always be the same. There may or may not be a new line character at the end of the last line in the file. Output: All output will be written to a file named pilot_areas.txt. Output file format o
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started