Tennessee Gibbs преди 6 години
родител
ревизия
59c433d762
променени са 5 файла, в които са добавени 35 реда и са изтрити 14 реда
  1. 0
    9
      Main.java
  2. BIN
      ScannerDemo.class
  3. 5
    0
      ScannerDemo.ctxt
  4. 25
    0
      ScannerDemo.java
  5. 5
    5
      package.bluej

+ 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
-}

BIN
ScannerDemo.class Целия файл


+ 5
- 0
ScannerDemo.ctxt Целия файл

@@ -0,0 +1,5 @@
1
+#BlueJ class context
2
+comment0.target=ScannerDemo
3
+comment1.params=arguments
4
+comment1.target=void\ main(java.lang.String[])
5
+numComments=2

+ 25
- 0
ScannerDemo.java Целия файл

@@ -0,0 +1,25 @@
1
+/**
2
+ * Created by iyasuwatts on 10/17/17.
3
+ */
4
+import java.util.Scanner;
5
+public class ScannerDemo {
6
+    public static void main(String[] arguments){
7
+        java.util.Scanner input = new java.util.Scanner(System.in);
8
+        String userName;
9
+
10
+        System.out.print("Please enter the username: ");
11
+        userName = input.nextLine();
12
+
13
+        if(userName.equalsIgnoreCase("alice")){
14
+            System.out.println("Hi Alice");
15
+
16
+        }
17
+        else if (userName.equalsIgnoreCase("bob")){
18
+            System.out.println("Hi Bob"); 
19
+
20
+        }
21
+    }   
22
+}
23
+
24
+
25
+ 

+ 5
- 5
package.bluej Целия файл

@@ -4,13 +4,13 @@ editor.fx.0.width=0
4 4
 editor.fx.0.x=0
5 5
 editor.fx.0.y=0
6 6
 objectbench.height=101
7
-objectbench.width=776
7
+objectbench.width=461
8 8
 package.divider.horizontal=0.6
9 9
 package.divider.vertical=0.8007380073800738
10 10
 package.editor.height=427
11 11
 package.editor.width=674
12
-package.editor.x=181
13
-package.editor.y=109
12
+package.editor.x=215
13
+package.editor.y=24
14 14
 package.frame.height=600
15 15
 package.frame.width=800
16 16
 package.numDependencies=0
@@ -24,9 +24,9 @@ readme.width=47
24 24
 readme.x=10
25 25
 readme.y=10
26 26
 target1.height=50
27
-target1.name=Main
27
+target1.name=ScannerDemo
28 28
 target1.showInterface=false
29 29
 target1.type=ClassTarget
30
-target1.width=80
30
+target1.width=110
31 31
 target1.x=70
32 32
 target1.y=10