subject
Engineering, 21.02.2020 20:20 neariah24

Artificial Intelligence elements in programming. Creating different outputs based on user input.

Ask a series of questions and based on the answer, create an adventure or story.

Welcome the use and let them know what is about to happen.
Use JOptionPane for input and output.
Use String. format() for the output.
Ask the user a series of questions. 10-15 questions with each answer being able to generate 1-3 sentences will build a nice size story.
Build a story for that user to read.
The story should be different based on the answers For example if the computer asks "How are you today?" the story takes a different turn for "Happy" that it would for "SAD"
Allow the user to do the story again without leaving the program. They should get different results with different answers.
Look at giving one or two answers with randomized results. (the same answer gets a different result)
Print the story for the user to see.
When they are ready to leave, thank the user for using the program.
The learning goal for this exercise is to use switch statements and loops to create a user input generated story.

Use at least one loop and three switch statements. You will likely need more. Some decisions can be satisfied with IF statements.
Use the java command to evaluate the results of your code.
IN JAVA

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Explain the difference laminar and turbulent flow. explain it with the shear stress and the velocity profiles.
Answers: 1
question
Engineering, 04.07.2019 18:10
Adouble-strand no. 60 roller chain is used to transmit power between a 13-tooth driving sprocket rotating at 300 rev/min and a 52-tooth driven sprocket. a) what is the allowable horsepower of this drive? b) estimate the center-to-center distance if the chain length is 82 pitches. c) estimate the torque and bending force on the driving shaft by the chain if the actual horsepower transmitted is 30 percent less than the corrected (allowable) power.
Answers: 3
question
Engineering, 04.07.2019 18:10
The thermal expansion or contraction of a given metal is a function of the f a)-density b)-initial temperature c)- temperature difference d)- linear coefficient of thermal expansion e)- final temperature f)- original length
Answers: 2
question
Engineering, 04.07.2019 18:10
Which of the following components of a pid controlled accumulates the error over time and responds to system error after the error has been accumulated? a)- proportional b)- derivative c)- integral d)- on/off.
Answers: 2
You know the right answer?
Artificial Intelligence elements in programming. Creating different outputs based on user input.
Questions
question
Mathematics, 20.05.2021 01:00
question
Mathematics, 20.05.2021 01:00
question
Mathematics, 20.05.2021 01:00
question
Mathematics, 20.05.2021 01:00
question
Mathematics, 20.05.2021 01:00
question
Mathematics, 20.05.2021 01:00
question
Mathematics, 20.05.2021 01:00
Questions on the website: 13722363