Question
Please answer in KOTLIN program In this lab we are going to create a game that uses all the different types of control operators that
Please answer in KOTLIN program
In this lab we are going to create a game that uses all the different types of control operators that exist in Kotlin.
The game will be a choose your own adventure game. The user will have to answer a series of questions and this will change the path of a story. This must be done by using if/else statements that are nested within other if/else statements. Your story must have four (4) different possible endings. Beyond this, you must provide some setup for the story to provide customized messages. Ask the user questions that will be used to capture details for use within the story.
Ask the user at least one question that has them choose something from a list of possible values and use a when statement to set the appropriate variable.
Ask the user at least one question that results in a numeric range and use a when statement with a range to set another variable.
Also ask the user a binary (yes/no or true/false) question. Use the answer from this in an if/else expression (not as a branch) to store another variable.
Use these variables within the output of the messages to the user in the story.
When you are done, set a break point in your program at the first line. Use IntelliJ to walk through each line of the code while you play the game. Use the tools of IntelliJ to check the values of the various variables after they are set. If you have screen recording software, use it to create a screen recording (no sound needed) of this process and hand this in as part of the submission. If you do not have screen recording software, simply take appropriate screenshots. The video should be only one or two minutes long. If you are using screenshots, there should be one for each line of code (make sure the variables panel is visible).
Requirements You must customize the story using at least one if/else expression. You must customize the story using at least one when expression. You must customize the story using at least one when expression with a range. You must have at least three (3) if/else block structures. There should be an if/else block nested within each branch of an if/else statement in order to provide at least 4 different endings to the story. The story must have four (4) different possible endings. Answering any question the opposite way must result in the next question being different on subsequent runs of the program. Keep your story clean and professional in theme and tone (see the syllabus rules of conduct for clarification on this if you are confused).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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