This assignment implements a hypothetical troubleshooting tree for possible engine failure in light aircraft. DO NOT FOLLOW IN A REAL EMERGENCY! A decision tree is an Artificial Intelligence method for arriving at a decision based upon a collection of IF state- ments. The computer asks a question and responds, based upon the answers. The computer only asks the relevant question based upon the user's answers (ie you dont ask all the questions and then try to sort it out.)
This program is menu driven. It presents four menu options, repre- senting 3 potential emergency situations: Communications Failure, Engine Failure, In-flight Icing. Quit the program is the final menu option. See figure 1 for an example menu.
1. Communications Failure
2. Engine Failure
3. In-Flight Icing
// Specification C1 - Communications Option
This makes the start of the communications option code.
// Specification C2 - Engine Failure Option
This makes the start of the engine failure option code.
// Specification C3 - In-Flight Icing Option
This makes the start of the in-flight icing option code.
// Specification B1 - Menu Input Validation
Only allow the client to enter valid numbers for the main menu. Quit the program with invalid entries. You can just display a gen- eral error message for this specification.
// Specification B2 - Icing Input Validation
Only allow a valid range for the de-icing menu. Exit the program with invalid input.
// Specification B3 - Date
On the first line of the main menu, include the current date. You can get the system date and use that, or you can prompt the client for the date. Your choice.
Figure 2: This is the engine failure menu selection: see image.
// Specification A1 - Alpha Menu
Change from a numeric menu to an alphabetic menu. See figure 3 for an example menu. Keep your numeric menu code - just com- ment it out. I only want 1 menu in operation.
// Specification A2 - Menu Input Validation
Only allow the client to enter valid letters for the main menu. Quit the program with invalid entries. You can just display a general error message for this specification. The replaces specification B1, so also like Specification A1 , just comment out the validation code which doesn't apply to a numeric menu.
// Specification A3 - One Function
I want to see at least one function in an "A" program. I don't care what you do with it, just write one. Dont forget the function prototype.