瀏覽代碼

commit Final Open Here

Khalil Saboor 6 年之前
父節點
當前提交
8f56e590b6
共有 6 個檔案被更改,包括 94 行新增0 行删除
  1. 12
    0
      tooBigSmall/README.TXT
  2. 32
    0
      tooBigSmall/package.bluej
  3. 二進制
      tooBigSmall/twoBTwoS$response.class
  4. 二進制
      tooBigSmall/twoBTwoS.class
  5. 6
    0
      tooBigSmall/twoBTwoS.ctxt
  6. 44
    0
      tooBigSmall/twoBTwoS.java

+ 12
- 0
tooBigSmall/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:

+ 32
- 0
tooBigSmall/package.bluej 查看文件

@@ -0,0 +1,32 @@
1
+#BlueJ package file
2
+editor.fx.0.height=729
3
+editor.fx.0.width=1112
4
+editor.fx.0.x=0
5
+editor.fx.0.y=23
6
+objectbench.height=102
7
+objectbench.width=461
8
+package.divider.horizontal=0.6
9
+package.divider.vertical=0.7988929889298892
10
+package.editor.height=426
11
+package.editor.width=674
12
+package.editor.x=0
13
+package.editor.y=23
14
+package.frame.height=600
15
+package.frame.width=800
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=twoBTwoS
28
+target1.showInterface=false
29
+target1.type=ClassTarget
30
+target1.width=90
31
+target1.x=70
32
+target1.y=0

二進制
tooBigSmall/twoBTwoS$response.class 查看文件


二進制
tooBigSmall/twoBTwoS.class 查看文件


+ 6
- 0
tooBigSmall/twoBTwoS.ctxt 查看文件

@@ -0,0 +1,6 @@
1
+#BlueJ class context
2
+comment0.target=twoBTwoS
3
+comment1.params=
4
+comment1.target=twoBTwoS()
5
+comment1.text=\n\ Constructor\ for\ objects\ of\ class\ twoBTwoS\n
6
+numComments=2

+ 44
- 0
tooBigSmall/twoBTwoS.java 查看文件

@@ -0,0 +1,44 @@
1
+
2
+/**
3
+ * Write a description of class twoBTwoS here.
4
+ *
5
+ * @author Khalil Saboor
6
+ * @version (a version number or a date)
7
+ */
8
+import java.util.*;
9
+public class twoBTwoS
10
+{
11
+    /**
12
+     * Constructor for objects of class twoBTwoS
13
+     */
14
+    public twoBTwoS()
15
+    {
16
+    int mysteryNumber = 5;
17
+    int count = 0;
18
+    boolean win = true;
19
+            
20
+    Scanner input = new Scanner(System.in);
21
+           
22
+        
23
+        do{
24
+            System.out.println("This is a guessing game");
25
+            System.out.println("to find the mystery number please enter a number:");
26
+            int number = input.nextInt();
27
+            if(number == 5){
28
+                System.out.println("You Win!!!");
29
+                System.out.println("You guess correctly");
30
+                System.out.println("The mystery number was "+ mysteryNumber);
31
+                System.out.println("You have guess "+ count + " times");
32
+                win = true;
33
+                break;
34
+            } else if(number < 5){
35
+            System.out.println("The number you entered is too low");
36
+            } else if(number > 5){
37
+            System.out.println("The number you entered is too high");
38
+            }
39
+            count++;
40
+            System.out.println("You have guess "+ count + " times");
41
+            System.out.println("Please try again:");
42
+    }while(mysteryNumber == 5);
43
+  }
44
+}