#36 AliceAndBob Lab

Offen
jasamuels möchte 1 Commits von jasamuels/ZCW-AliceAndBob-BlueJ:master nach master zusammenführen
5 geänderte Dateien mit 36 neuen und 16 gelöschten Zeilen
  1. 0
    9
      Main.java
  2. BIN
      greeting.class
  3. 6
    0
      greeting.ctxt
  4. 23
    0
      greeting.java
  5. 7
    7
      package.bluej

+ 0
- 9
Main.java Datei anzeigen

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
greeting.class Datei anzeigen


+ 6
- 0
greeting.ctxt Datei anzeigen

1
+#BlueJ class context
2
+comment0.target=greeting
3
+comment0.text=\n\ Created\ by\ iyasuwatts\ on\ 10/17/17.\n
4
+comment1.params=args
5
+comment1.target=void\ main(java.lang.String[])
6
+numComments=2

+ 23
- 0
greeting.java Datei anzeigen

1
+import java.util.*;
2
+
3
+/**
4
+ * Created by iyasuwatts on 10/17/17.
5
+ */
6
+public class greeting {
7
+    
8
+    public static void main(String[] args ){    
9
+    
10
+    Scanner in = new Scanner(System.in);
11
+    
12
+    System.out.print("What's your name?");
13
+    String name = in.nextLine();
14
+    name = name.toLowerCase();
15
+//   System.out.print(name);        testing testing
16
+    
17
+    if (name.equals("bob") || name.equals("alice")) {
18
+        System.out.print("Access Granted!");
19
+    }
20
+    else {
21
+        System.out.print("Access Denied.");
22
+    };
23
+}};

+ 7
- 7
package.bluej Datei anzeigen

1
 #BlueJ package file
1
 #BlueJ package file
2
-editor.fx.0.height=0
3
-editor.fx.0.width=0
4
-editor.fx.0.x=0
5
-editor.fx.0.y=0
2
+editor.fx.0.height=709
3
+editor.fx.0.width=800
4
+editor.fx.0.x=314
5
+editor.fx.0.y=25
6
 objectbench.height=101
6
 objectbench.height=101
7
 objectbench.width=776
7
 objectbench.width=776
8
 package.divider.horizontal=0.6
8
 package.divider.horizontal=0.6
9
 package.divider.vertical=0.8007380073800738
9
 package.divider.vertical=0.8007380073800738
10
 package.editor.height=427
10
 package.editor.height=427
11
 package.editor.width=674
11
 package.editor.width=674
12
-package.editor.x=181
13
-package.editor.y=109
12
+package.editor.x=27
13
+package.editor.y=84
14
 package.frame.height=600
14
 package.frame.height=600
15
 package.frame.width=800
15
 package.frame.width=800
16
 package.numDependencies=0
16
 package.numDependencies=0
24
 readme.x=10
24
 readme.x=10
25
 readme.y=10
25
 readme.y=10
26
 target1.height=50
26
 target1.height=50
27
-target1.name=Main
27
+target1.name=greeting
28
 target1.showInterface=false
28
 target1.showInterface=false
29
 target1.type=ClassTarget
29
 target1.type=ClassTarget
30
 target1.width=80
30
 target1.width=80