Engineering
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

answer
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 16:10, Arealbot
The force on a cutting tool are 2600n vertically downward and 2100 horizontal. determine the resultant force acting on the tool and the angle at which it acts.
Answers: 1
image
Engineering, 04.07.2019 18:10, niyawilliams23
Asingle-geared blanking press has a stroke of 200 mm and a rated capacity of 320 kn. a cam driven ram is assumed to be capable of delivering the full press load at constant force during the last 15 percent of a constant-velocity stroke. the camshaft has an average speed of 90 rev/min and is geared to the flywheel shaft at a 6: 1 ratio. the total work done is to include an allowance of 16 percent for friction a) estimate the maximum energy fluctuation b) find the rim weight for an effective diameter of 1.2 m and a coefficient of speed fluctuation of 0.10
Answers: 1
image
Engineering, 04.07.2019 18:10, bunnles
During a steady flow process, the change of energy with respect to time is zero. a)- true b)- false
Answers: 2
image
Engineering, 04.07.2019 18:10, Talos02
Burgers vector is generally parallel to the dislocation line. a)-true b)-false
Answers: 2
Do you know the correct answer?
Artificial Intelligence elements in programming. Creating different outputs based on user input.

Questions in other subjects:

Konu
History, 21.08.2019 07:10