"Switch" statements

Note:  Please keep the programs that you create today, in case you have a dispute about your grades for the ICEs at the end of the quarter. When you're working with a partner, each person should save their own, individual copy

Part 1: Switch: Nonrobotic code

 

            Goal: Be able to write a switch statement from scratch, that doesn't use Robots

 

            Imagine that you're writing code to be used in a weight-lifting gym.  The idea is that a person will do some number of repetitions of some exercise (for example, 12 bench presses), then type that number into your program, and receive feedback based on that.

 

Using the Nonrobot_Template.java file from the website, create a program that will repeatedly ask the user for the number of repetitions they've done.  Based on that number, you should offer feedback to the user according to the following chart (feel free to substitute your own, but don't offend the customer!)

# Reps

Output

0

You need to start your workout!

1

That's all?  You need to keep going!!!!!

2

That's all?  You need to keep going!

3

You're starting to start….

4-6

You're warming up

7+

Nice job!