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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 18:30, erjalinalii
Janice recently received her college degree and is looking for a job. she is worried that since she just finished school, she will be required to repay her perkins and direct subsidized loans immediately. janice pulls out the paperwork she signed and reviews it again for repayment information. after reading all of the information, janice discovers that
Answers: 2
image
Computers and Technology, 24.06.2019 03:00, greenhappypiggies
Using a conditional expression, write a statement that increments numusers if updatedirection is 1, otherwise decrements numusers. ex: if numusers is 8 and updatedirection is 1, numusers becomes 9; if updatedirection is 0, numusers becomes 7.
Answers: 1
image
Computers and Technology, 24.06.2019 13:00, CarlosParker99
Think of a spreadsheet as a giant calculator spread of paper chart data collector
Answers: 2
image
Computers and Technology, 24.06.2019 17:40, hughesnatalia2003
File i/o activity objective: the objective of this activity is to practice working with text files in c#. for this activity, you may do all code in the main class. instructions: create an app that will read integers from an input file name numbers. txt that will consist of one integer per record. example: 4 8 25 101 determine which numbers are even and which are odd. write the even numbers to a file named even. txt and the odd numbers to a file named odd. txt.
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 in other subjects:

Konu
Biology, 18.10.2019 09:10
Konu
Mathematics, 18.10.2019 09:10