subject

In this assignment, you will be simulating an Air Traffic Control tower. This program uses data of the Airplane class type. This is a custom class that you will use for this activity. Each Airplane object represents an actual airplane that is detected by the tower at a particular instance in time. The Airplane object has a number of fields: a horizontal distance in miles from the tower (as a positive decimal number), a bearing (compass direction) from the tower (as an integer from 0 to 360), a positive altitude (height) in feet (as a positive integer) and a call-sign which consists of letters, numbers, and symbols.

The Airplane class has the following constructors and methods:

You will first write code to create a plane, "Airplane 1", with the default callsign of AAA01, starting in the default position of 1 mile due north (0°) of the tower at an altitude of 0 feet.

Your program should then ask the user to input the details of a second airplane, "Airplane 2", detected by the tower. This will consist of the call-sign, distance, direction and altitude. Once these inputs have been entered, your program should convert the callsign to use uppercase letters, then create Airplane 2 using these details.

Next, your program should print the details of Airplane 1 and Airplane 2 in the exact format shown in the sample runs. This should be followed by the distance in miles between the two planes and the difference in height (the height difference must be positive).

The following changes should then be made to the positions of the planes:

Increase the altitude of Airplane 1 by 4000 feet.
Decrease the altitude of Airplane 2 by 2000 feet (or to 0 if this would make the altitude negative).
Move Airplane 1 a distance of 10.5 miles on a heading of 50 degrees
Move Airplane 2 a distance of 8.0 miles on a heading of 125 degrees
After this, your program should print the details of the planes with their new positions, and then the new distance and (positive) height difference between the planes.

You should carefully follow the format shown below in the sample runs when you create your program: make sure your program produces the exact same output when you input the sample data into it.

Milestones
Milestone 1: Write a constructor call to create the first default plane. Then write code to get inputs of the correct type for each field for the second plane. Convert the callsign to uppercase and use this data to create Airplane 2.

Milestone 2: Write code that prints the relevant details for the two airplanes. Calculates the distance between the two planes and the (positive) difference in altitude between them, then print both of these values.

Milestone 3: Write code that moves the planes as desired (the first airplane up 4000 feet and the second down 2000 feet, then the first airplane 10.5 miles on a heading of 50 degrees, and the second 8.0 miles on a heading of 125 degrees). Repeat the code from milestone 2 to print the new positions.


In this assignment, you will be simulating an Air Traffic Control tower. This program uses data of
In this assignment, you will be simulating an Air Traffic Control tower. This program uses data of

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 07:30
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
What is the biggest difference between section breaks and regular page breaks? section breaks are more difficult to add than page breaks. section breaks make it easier for you to view the document as an outline. section breaks allow you to have areas of the document with different formatting. section breaks are smaller than regular page breaks.
Answers: 2
question
Computers and Technology, 23.06.2019 21:40
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings. for each match, add one point to user_score. upon a mismatch, end the game. sample output with inputs: 'rrgbryybgy' 'rrgbbrybgy'
Answers: 3
question
Computers and Technology, 24.06.2019 02:10
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
Answers: 2
You know the right answer?
In this assignment, you will be simulating an Air Traffic Control tower. This program uses data of t...
Questions
question
Social Studies, 24.07.2019 14:30
Questions on the website: 13722361