|
|
|
|
2
|
|
2
|
|
3
|
# Guessing Game; Too Large Too Small
|
3
|
# Guessing Game; Too Large Too Small
|
4
|
|
4
|
|
5
|
-### Topics
|
|
|
6
|
-* user input
|
|
|
7
|
-* `Random` object
|
|
|
8
|
-
|
|
|
9
|
-## Overview
|
|
|
|
|
5
|
+## **Objective:**
|
10
|
* Write a guessing game which prompts a user to guess a mystery number within some range.
|
6
|
* Write a guessing game which prompts a user to guess a mystery number within some range.
|
11
|
* After every guess the program should display some variation of "too large", "too small", "correct guess", respectively.
|
7
|
* After every guess the program should display some variation of "too large", "too small", "correct guess", respectively.
|
12
|
* Upon termination, the program should display the number of guesses before successfully guessing correctly.
|
8
|
* Upon termination, the program should display the number of guesses before successfully guessing correctly.
|
13
|
* A number that is input consecutively, should register as a single guess.
|
9
|
* A number that is input consecutively, should register as a single guess.
|
14
|
|
10
|
|
|
|
11
|
+### **Purpose:**
|
|
|
12
|
+* To establish familiarity with
|
|
|
13
|
+ * Control Flow
|
|
|
14
|
+ * Conditionals
|
|
|
15
|
+ * User input
|
|
|
16
|
+ * The `Random` class
|
|
|
17
|
+ * Object instantation/declaration
|
|
|
18
|
+ * Method invokation
|
|
|
19
|
+
|
|
|
20
|
+### **Resources:**
|
|
|
21
|
+* [Procedural Programming](https://zipcoder.github.io/reveal-slides-light/procedural-programming.html#/)
|
|
|
22
|
+
|
15
|
## Unit Test
|
23
|
## Unit Test
|
16
|
No Unit Test
|
24
|
No Unit Test
|
17
|
|
25
|
|
18
|
-
|
|
|
19
|
## What's Next?
|
26
|
## What's Next?
|
20
|
-* The next lab can be found [here](https://github.com/Zipcoder/ZCW-MicroLabs-JavaFundamentals-SumOrProduct)
|
|
|
|
|
27
|
+* The next lab can be found [here](https://github.com/Zipcoder/ZCW-MicroLabs-JavaFundamentals-SumOrProduct)
|