Program that let the pilot issue commands to the aircraft

Assignment Help C/C++ Programming
Reference no: EM132281186

Object-Oriented Programming Fundamentals Assignment Part B - Angles and lights explained

Assessment Objectives:

  • To practise using the Math class.
  • To practise reading from the console and writing to the screen.
  • To practice using switch and/or multiway selection branches.
  • To practise using loops (repetition).

What we want the program to do:

We need to write a program, in Java, that will let the pilot issue commands to the aircraft to get it down safely on the flight deck.

The program starts by prompting (asking) the user to enter the (start) approach speed in knots.

A knot is a nautical mile and is the unit used in the navy and by the navy pilots.

After the user enters the approach speed, the user is then shown the menu and the pilot picks a command.

The effect of this command is then calculated and the updated information about the aircraft is displayed. If the aircraft has crashed or has landed, then the information is different.

If the aircraft does not land, overshoot or crash, then the program presents the menu again and the user makes another choice (or the same choice again) and the program calculates the updated position of the aircraft and displays the information to the pilot (the user)'.

This continues until the aircraft successfully lands on the flight desk, the aircraft crashes or the aircraft overshoots the landing area.

To successfully land, the aircraft must have its hook down and its gear down when it is in the valid landing zone.

To be in the correct landing zone with the hook up and gear down, means the aircraft doesn't stop in time and has to go around, this is known as an overshoot.

To be in the correct landing zone with the gear (landing gear) up means that the aircraft crashes. (Whether the hook is up or down doesn't matter).

At any time, the user can issue the command Eject. This displays a message and stops the program, the aircraft crashes into the ocean.

The commands and the changes they make are listed below.

Note that commands must be case insensitive. That is, HOOK Down and hook dOWN must have the same effect.

If the aircraft is still on approach, that is, it hasn't landed, overshot or crashed, the new height is shown along with the distance (which is to the back (stern) of the flight deck) and the glide path angle.

The starting state of the aircraft is gear up, hook up and flaps level.

An invalid command should not change anything about the conditions of the plane.

The commands and their effects are listed below.

Recall that the aircraft is always moving forward at the speed set at the start of the program.

Only certain commands are allowed, these are entered as text (not numbers) Invalid commands should be ignored.

The allowed commands and the change they make:

Gear Up - This increases the height + 20 feet (this is a one off effect) If the gear is already up, then an appropriate message is displayed to the screen and the height is not changed.

Gear Down - This decreases the height 20 feet (this is a one off effect) If the gear is already down, then an appropriate message is displayed to the screen and the height is not changed.

Hook up - This increases the height + 10 feet (this is a one off effect) If the hook is already up, then an appropriate message is displayed to the screen and the height is not changed.

Hook Down - This decreases the height 10 feet (this is a one off effect) If the hook is already down, then an appropriate message is displayed to the screen and the height is not changed.

Flaps Up - This increases the height + 15 feet (this is a one off effect) If the flaps are already fully up, then an appropriate message is displayed to the screen. The height is changed by +15, even if the flaps are already fully up.

Flaps Down - This decreases the height 15 feet (this is a one off effect) If the flaps are already fully down, then an appropriate message is displayed to the screen. The height is changed by - 15, even if the flaps are already fully down.

To go from flaps fully up to flaps fully down requires 2 steps, the first time the Flaps down command is issued the flaps go to level, then the next time the flaps down command is issued, they go to fully down.

If the flaps are level, they do not change the height on the next time through the menu.

This is the same for flaps up, if the flaps are fully down, then the command flaps up brings the flaps to level, the next flaps up command would see the flaps go from level to fully up.

Maintain - This command does not change the height, just flies straight and level. Note that the one thing this command must do is set the flaps to the level position. The distance changes.

Power Up - This command increases the height by 5.

Power Down - This command decreases the height by 5.

Eject - Ends the program, after a screen message.

The distance, angle and height figures must be displayed to 2 decimal places.

Your program must correctly deal with the user entering an invalid command (not one of the commands listed above). If the user enters an invalid command, an appropriate message is displayed to the screen, and nothing is changed, just go straight back to the menu again.

The program ends when the aircraft lands, crashes or overshoots, or the user selects the Eject command.

Attachment:- Assignment File.rar

Reference no: EM132281186

Questions Cloud

Describe the fundamental financial mechanics involved : Describe the fundamental financial mechanics involved in the delivery of health care services. Include events such as medical claim form generation.
Compare process improvement tools and techniques : Compare and contrast 3 process improvement tools and techniques from the tools listed above. In your opinion, which is the best quality process improvement.
Identify and discuss the multiplicity of these categories : Each information system above doesn't neatly fall into a single IS category such as TPS, MIS, DSS, ESS, ERP, SCM, CRM, KMS, collaboration environments.
Explain what occurred the impact of the breach : Research an organization that was breached or had a security intrusion (an event that occurred within the past 13 weeks). Explain what occurred, the impact.
Program that let the pilot issue commands to the aircraft : CSE1OOF Object-Oriented Programming Fundamentals Assignment Part B - Angles and lights explained, La Trobe University, Australia
Explain the connection between knowledge or concepts : Reflect on the connection between knowledge or concepts from these courses and how those have been, or could be, applied in the work place.
Define disaster recovery planning : Explain the role of Maximum Acceptable Outage (MAO), Recovery Time Objective (RTO) and Recovery Point Objective (RPO) in BIA and DRP.
Explain disadvantages of using a vpn instead of leased line : What are the disadvantages of using a VPN instead of a leased line? If a hacker hacks into a network, copies a few files, defaces the Web page, and steals.
Review industry and competitive information pertaining : Review industry and competitive information pertaining to the company.

Reviews

len2281186

4/12/2019 1:52:44 AM

This is an individual Assignment. You are not permitted to work as a Pair Programming partnership or any other group when writing this assignment. Submission Details: Full instructions on how to submit electronic copies of your source code files from your latcs8 account are given at the end. If you have not been able to complete a program that compiles and executes containing all functionality, then you should submit a program that compiles and executes with as much functionality as you have completed. (You may comment out code that does not compile.) Note you must submit electronic copies of your source code files using the submit command on latcs8. Ensure you submit the required file.

len2281186

4/12/2019 1:52:37 AM

Marking Scheme: This assignment is worth 7% of your final mark in this subject. Marking scheme: 90% for the code executing correctly and 10%, you will be asked to explain (and / or alter) parts of your code. Please also note carefully that whilst we encourage innovation and exploring java beyond what has been presented in the subject to date, above all, we encourage understanding. All of the Tasks that follow can be solved using techniques that have been presented in lectures, lecture / workshops and labs so far.

len2281186

4/12/2019 1:52:29 AM

These are the techniques and knowledge that we will later be examining in the Real Time Test (20 marks) and the exam (50 marks). Code and techniques that are outside the material presented will not be examined, of course. You are free to solve the Tasks below in any way, with one condition. Submitting an assignment with code outside what has been presented so far and not attending the marking execution test will result in an automatic mark of 0, regardless of the correctness of the submission.

Write a Review

C/C++ Programming Questions & Answers

  Create a square using the tangram pieces

Explain your design and implementation process and any challenges you came across, as well as how they were overcome at the end

  Design build prototype weather information processing system

CSCI251 Advanced Programming - Apply the concepts learnt by developing a Weather Information Processing System - Learning about procedural programming

  Fill up the tables

Fill up the tables and show ALL the steps required to solve each problem below. You must convert the entire IP address to binary.

  Write a program to compute and print the mean

Write a program to print a report that lists the average power output for the the first week, the second week, and so on. Print the information in the following format

  Design a class that has a static method named writearray

Design a class that has a static method named writeArray.  THe method should take two arguments: the name of a file and a reference to an int array.

  Code to implement a staque

Write a C++ code to implement a Staque. Since the data structure is all about inserting and deleting numbers, it would be a good option to use a linked list to implement Staque.

  Consider the following nested loop construct

Consider the following nested loop construct. Categorize its efficiency in terms of the variable n using big-O notation. Suppose the statements represented by the ellipsis require four main memory accesses (each requiring one microsecond) and two dis..

  Write complete implementation of cohen sutherland algorithm

Write a complete implementation of the Cohen Sutherland algorithm, putting together the pieces described. Why will a "divide by zero" never occur? Consider a vertical line segment such that delx is zero

  Once the user enters a 0

Once the user enters a 0 you will exit the loop, close the file and execute the code as previously designed until you have displayed all of the scores and the average handicap.

  Write a function that returns a number

Write a test program that prompts the user to enter a phone number as a string. The input number may contain letters. The program translates a letter (upper- or lowercase) to a digit and leaves all other characters intact

  Write a linux program that will calculate temperature

Write a Linux program that will calculate temperature in degrees F, given temperature in degrees C, where C is 34.5. (The formula is.. F = (9/5) * C + 32.0).

  Create a program reads in a senctence and encodes it

Create a program reads in a senctence and encodes it. Ask the user for the sentence, a mulitplier and an adder.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd