#32 finished, too large too small

Отворено
jbedolla40 жели да споји 1 комит(е) из jbedolla40/ZCW-TooLargeTooSmall-BlueJ:master у master
9 измењених фајлова са 99 додато и 36 уклоњено
  1. BIN
      .DS_Store
  2. 0
    9
      Main.java
  3. 12
    0
      README.TXT
  4. 0
    27
      README.md
  5. BIN
      bigSmall.class
  6. 5
    0
      bigSmall.ctxt
  7. 50
    0
      bigSmall.java
  8. 32
    0
      package.bluej
  9. BIN
      toBigtoSmall/.DS_Store

+ 0
- 9
Main.java Прегледај датотеку

@@ -1,9 +0,0 @@
1
-/**
2
- * Created by iyasuwatts on 10/17/17.
3
- */
4
-public class Main {
5
-
6
-    public static void main(String[] args){
7
-        
8
-    }
9
-}

+ 12
- 0
README.TXT Прегледај датотеку

@@ -0,0 +1,12 @@
1
+------------------------------------------------------------------------
2
+This is the project README file. Here, you should describe your project.
3
+Tell the reader (someone who does not know anything about this project)
4
+all he/she needs to know. The comments should usually include at least:
5
+------------------------------------------------------------------------
6
+
7
+PROJECT TITLE:
8
+PURPOSE OF PROJECT:
9
+VERSION or DATE:
10
+HOW TO START THIS PROJECT:
11
+AUTHORS:
12
+USER INSTRUCTIONS:

+ 0
- 27
README.md Прегледај датотеку

@@ -1,27 +0,0 @@
1
-# ZCW-MicroLabs-JavaFundamentals-TooLargeTooSmall
2
-
3
-# Guessing Game; Too Large Too Small
4
-
5
-## **Objective:**
6
-* Write a guessing game which prompts a user to guess a mystery number within some range.
7
-* After every guess the program should display some variation of "too large", "too small", "correct guess", respectively.
8
-* Upon termination, the program should display the number of guesses before successfully guessing correctly.
9
-* A number that is input consecutively, should register as a single guess.
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
-
23
-## Unit Test
24
-No Unit Test
25
-
26
-## What's Next?
27
-* The next lab can be found [here](https://github.com/Zipcoder/ZCW-MicroLabs-JavaFundamentals-SumOrProduct)


+ 5
- 0
bigSmall.ctxt Прегледај датотеку

@@ -0,0 +1,5 @@
1
+#BlueJ class context
2
+comment0.target=bigSmall
3
+comment1.params=
4
+comment1.target=void\ sampleMethod()
5
+numComments=2

+ 50
- 0
bigSmall.java Прегледај датотеку

@@ -0,0 +1,50 @@
1
+
2
+/**
3
+ * guessing game for the user to guess a number in between 2 numbers.
4
+ *
5
+ * @author (JOSE BEDOLLA)
6
+ * @version (Too Large Too Small)
7
+ */
8
+import java.util.*;
9
+public class bigSmall
10
+{
11
+
12
+
13
+
14
+    public void sampleMethod()
15
+    {
16
+        int counter = 0;
17
+        int in = 0;
18
+        
19
+        Random rand = new Random();
20
+        int number = rand.nextInt(10);
21
+        
22
+        Scanner input = new Scanner(System.in);
23
+        System.out.println("Welcome to the game! ");
24
+        
25
+        while(in != number)
26
+        {
27
+            System.out.println("Enter a number: ");
28
+            in = input.nextInt();
29
+            counter++;
30
+             
31
+            if(in < number)
32
+            {
33
+               System.out.println("Too low "); 
34
+            }
35
+            else if(in > number)
36
+            {
37
+                System.out.println("Too high ");
38
+            }
39
+            else
40
+            {
41
+                System.out.println("Correct");
42
+            }
43
+        }
44
+       
45
+        System.out.println("Number of guesses: " + counter);
46
+
47
+        
48
+        
49
+    }
50
+}

+ 32
- 0
package.bluej Прегледај датотеку

@@ -0,0 +1,32 @@
1
+#BlueJ package file
2
+editor.fx.0.height=722
3
+editor.fx.0.width=800
4
+editor.fx.0.x=1454
5
+editor.fx.0.y=23
6
+objectbench.height=154
7
+objectbench.width=484
8
+package.divider.horizontal=0.6
9
+package.divider.vertical=0.7553191489361702
10
+package.editor.height=490
11
+package.editor.width=382
12
+package.editor.x=2430
13
+package.editor.y=29
14
+package.frame.height=716
15
+package.frame.width=508
16
+package.numDependencies=0
17
+package.numTargets=1
18
+package.showExtends=true
19
+package.showUses=true
20
+project.charset=UTF-8
21
+readme.height=58
22
+readme.name=@README
23
+readme.width=47
24
+readme.x=10
25
+readme.y=10
26
+target1.height=50
27
+target1.name=bigSmall
28
+target1.showInterface=false
29
+target1.type=ClassTarget
30
+target1.width=80
31
+target1.x=70
32
+target1.y=10

BIN
toBigtoSmall/.DS_Store Прегледај датотеку