Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN JAVA ONLY. With Screenshot PLEASE Decision Trees: Many videos games and interactive stories use decision trees to allow for different dialogue based on the

IN JAVA ONLY. With Screenshot PLEASE

image text in transcribedimage text in transcribed

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 printed 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. 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 \#1: [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 \#2: [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... 1) Life finds a way... 2) What do we do? Life finds a way... That's not helpful right now! We have to evacuate the park

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions