Question: use a nested if statement and solve in c# Assignment3C: Decision Trees: Many videos games and interactive stories use decision trees to allow for different


Assignment3C: Decision Trees: Many videos games and interactive stories use "decision trees" to allow for different dialogue based on the player's choices. For this assignment, you will create a (basic) dialogue system using NESTED IF statements. The diagram on the next page shows the different choices you can make, and the appropriate responses. Note: The following diagram is a simplified form of UML - Unified Modeling Language. It is one way to display an algorithm so that people can understand it and implement it in code. For our purposes, the boxes show the jprinted prompts and responses. The diamonds indicate decisions after each prompt. For example, if I respond "No, I just turned off the light." to the first prompt, my program should print the response shown at the end of the "No" line on the diagram. "Oh no, the power has gone out at Cretaceous Park!" You must call the class Assignment3C and put it in a file called "Assignment3C.java", "Assignment3C.cs", or "Assignment3C.cpp" Make sure to use nested IF statements to complete this assignment. Your program should produce the following output based on different user input (Don't worry about invalid input). Sample Output I1: [Cretaceous Park Dialog] Oh no, the power has gone out at Cretaceous Park! 1) What does that mean? 2) No, I just turned the light off. No, I just turned off the light oh thank goodness! Sample Output 12 . [Cretaceous Park Dialog] Oh no, the power has gone out at Cretaceous Parkl 1) What does that mean? 2) No, I just turned the light off. What does that mean? The dinosaurs will get loose... again... 1) Life finds a way... 2) What do we do? Iife finds a way... That's not helpful right now! We have to evacuate the park! Sample output 13 i [Cretaceous Park Dialog] Oh no, the power has gone out at Cretaceous Park! 1) What does that mean? 2) No, I just turned the light off. What does that mean? The dinosaurs will get loose... again... I) Life finds a way... 2) What do we do? What do we do? We have to evacuate the park
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
