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, 22.06.2019 02:00
What is the process in which the software development team compiles information to determine the final product.
Answers: 3
question
Computers and Technology, 22.06.2019 17:00
Annie is creating a corporate report for a company’s annual meeting. in the report, she wants to add the signature of various department heads. which device can annie use to capture signatures to include in the report? a. printer b. monitor c. e-reader d. digitizing tablet
Answers: 1
question
Computers and Technology, 23.06.2019 01:10
Problem 1 - hashing we would like to use initials to locate an individual. for instance, mel should locate the person mark e. lehr. note: this is all upper case. generate a hash function for the above using the numbers on your telephone. you know, each letter has a number associated with it, so examine your telephone keypad. generate 512 random 3 letter initials and take statistics on a linked list array size 512 to hold this information report how many have no elements, 1 element, 2 elements, does this agree with the hashing statistics distribution?
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
In deadlock avoidance using banker’s algorithm, what would be the consequence(s) of: (i) a process declaring its maximum need as maximum possible for each resource. in other words, if a resource a has 5 instances, then each process declares its maximum need as 5. (ii) a process declaring its minimum needs as maximum needs. for example, a process may need 2-5 instances of resource a. but it declares its maximum need as 2.
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, 01.01.2020 06:31
question
Mathematics, 01.01.2020 06:31
Questions on the website: 13722367