6) 650 - Rock, Paper, Scissors (v3)

r

Add menu to RPS with options to play a single game, to play a best of #, to display help, and to exit the program.The program must utilize functions for all options along with a switch statement in main.

md

Problem type

r

What tools or patterns apply? What is the best way to visualize or represent the inputs and outputs for the program?Expression or series of expressions(simple algorithm)Timeline?Collection?Think about the different types of math word problems you "know" how to solve.

Problem type

What do you know?

r

Factual data about the problem

Fact

Use case(s)

d

Primary

r

Here's where you can put your recipe for your Humanoid Analog Computer(HACr).

Revised

r

You can even put the "ideal" script here in the notes.

Using a menu

r

Add menu to RPS with options to play a single game, to play a best of #, to display help, and to exit the program.1) Play a single game of RPS2) Play best of # RPS games3) Display help4) Exit programThe program must utilize functions for all options along with a switch statement in main.

What don't you know?

r

What other information might help, but is not available today?* How would it help?* How could you obtain it?* Can you work without it?* What are the risks or consequences of not knowing?* Who else might have further information and insight?

randomize computer choice

r

random number generator

enumerating the available:

r

How do enumerations support the concept of expressive coding?

choices

results

What assumptions
are you making?

r

In identifying the problem and the probability of a solution, what assumptions are you making?Assumptions can sometimes be hard to see or accept. For example, if the "problem" is that sales of a certain product are too low, you may naturally aim to increase sales. You are ''assuming'' that the market demand for this product will continue. But if the demand disappeared overnight in a storm of negative publicity, then the original problem and solution also change. So the problem and logical solution are partly based on an assumption.

a) user knows how to play RPS

computer can generate a
"good" random number

r

0 => Rock1 => Paper2 => Scissors

Solution criteria

r

How will you know when you have solved the problem?* What will a successful solution look like?* How will you filter and assess potential solutions?* How will you verify that the issue has been solved?You might want to return to the solution criteria several times as you develop the definition of the problem.!

Console-based
program

r

Perform the following until there is a winnerInput:Get validated input from user/player and convert to the appropriate choiceProcess:Get the computer's choiceDetermine the outcomeOutput:Display computer's choice as: 'rock', 'paper', 'scissors'Display outcome: player wins, player loses or tie

program will loop until
there is a winner

r

game cannot end in a draw

validate player/user input

conditional logic is limited
to 'if/else if/else'
looping is limited to 'while'

no user-defined functions

use const int's to represent
possible choices and outcomes

r

0 => Rock1 => Paper2 => Scissors// possible choicesconst int ROCK = 0;const int PAPER = 1;const int SCISSORS = 2;// possible outcomes for the playerconst int WIN = 1;const int LOSE = -1;const int TIE = 0;

Root cause analysis

r

For analytical problems, root cause analysis can help to unravel indirect causes of problems, leading to more effective solutions. One way to do this is to keep asking "Why?" down to five levels, to understand the reasons behind the reasons.

Impact analysis

r

Impact analysis looks at who is affected by the problem - what the consequences are, rather than the causes.

Person

Impact

Six serving men

r

"Six Serving Men" is based on Rudyard Kipling's poem, which begins:''I keep six honest serving men(They taught me all I knew);Their names are What and Why and WhenAnd How and Where and Who.''We can profile a problem and perhaps discover more about it by asking structured questions.

Analogies

r

Can you find analogies for this problem?The underlying characteristics of a problem can sometimes be clearer when it is taken out of context.

What is it like?

Be the problem

r

Be the problem is a popular technique for understanding problems. It means developing a character for the problem and describing its nature as if it were a person.

Insight

Get Validated Input

m

Welcome

r

Researching and describing a problem clearly is the foundation for solving it. Solutions based on incomplete research or poor descriptions can often fail to reach the root causes.This Smart Map helps you to research and describe a problem from a number of different angles. It contains a mix of factual information-gathering tools and lateral thinking techniques, to develop perspectives that can point towards solutions.You can use this map individually and in collaboration with others. It is vital to get consensus on the actual problem you are facing, otherwise there may be no consensus on the solution. Putting the descriptions together in one place helps you to explain and agree upon the basis for finding and evaluating solutions.You can delete this topic from the saved map.

Where next?

r

You can continue to develop this map without the Smart Map wizard by saving it as a normal Mindomo map.When have a comprehensive description of the problem, you can move towards finding solutions. Consider a brainstorm as a next step, using the Brainstorming Toolbox Smart Map.You can delete this topic from the saved map.

d