Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Criteria The program asks for user input to dictate the story The program asks the user to pick from three options at the first
Criteria The program asks for user input to dictate the story The program asks the user to pick from three options at the first branch The program asks the user to pick from two options at the second branch The program uses if-else-if statements The program uses nested conditional statements The program includes appropriate code comments TOTAL Points 5 pts 5 pts 5 pts 5 pts 5 pts 5 pts 30 pts My Story Assignment My Story Coding Assignment Using the MyStory program in the right panel, your task is to write and test a program that provides an interactive story. These are the requirements: You must ask the user to provide input and those responses dictate the story You must use if-else-if statements and nested statements The story should allow the user to pick from three options at the first branch and then choose from two options at the second branch Be creative! Whenever you are ready to compile and test your program, click the Compile and Run button. COMPILE AND RUN Project container was stopped by inactivity timeout, please MyStory.java 1234 5 6 7 8 9 10 11 12 13 14 15 16 17 import java.util.Scanner; public class MyStory { public static void main(String[] arg) { /* *The Scanner class is used for reading in data to your program. */ Scanner keyboard = new Scanner (System.in); //Copy and paste this code when you want the user to make a decision //By selecting a number System.out.print("Enter your choice: "); int choice = keyboard.nextInt(); //Write your code below:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Below is a simple interactive story program that follows the specified criteria java import javautilScanner public class MyStory public static void ma...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started