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, 21.06.2019 21:30
Apower user needs you to install a second type of operating system on his computer to increase efficiency while running some specialized software programs. which installation technique should you use?
Answers: 3
question
Computers and Technology, 22.06.2019 04:30
Kyle, a receptionist for a building supply company, recently won an award for saving his company money on their phone system. after being presented with kyle's research, the company changed the way in which it made long-distance phone calls and cut their expenses in this area by 75 percent. the new system the kyle's company most likely adopted was wired communications switching stations voip hdtv
Answers: 3
question
Computers and Technology, 22.06.2019 06:00
Write a function that draws a pool ball. this function should take as parameters, the color, the number that should go on the pool ball, and the location of the center of the pool ball. the radius of the pool balls should be pool_ball_radius, and the font of the number should be pool_ball_font. the text of the pool ball font should be white. drawpoolball(color.orange, 5, 100, 100); drawpoolball(color.green, 6, 50, 200); drawpoolball(color.red, 3, 150, 350); drawpoolball(color.blue, 2, 250, 140); to center the numbers on the pool ball, you should use the getwidth() and getheight() methods. you are allowed to call these methods on your text object, such as txt.
Answers: 3
question
Computers and Technology, 23.06.2019 01:30
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most? a)give the file a unique name b)name the file in yymmdd format c)use descriptive name while naming the files d)use capital letters while naming the file
Answers: 3
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
Mathematics, 19.12.2021 01:30