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 program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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