Browse Source

AliceAndBob complete#

Donna Jacobs 6 years ago
parent
commit
26622650e7
4 changed files with 22 additions and 5 deletions
  1. BIN
      Main.class
  2. 5
    0
      Main.ctxt
  3. 12
    0
      Main.java
  4. 5
    5
      package.bluej

BIN
Main.class View File


+ 5
- 0
Main.ctxt View File

1
+#BlueJ class context
2
+comment0.target=Main
3
+comment1.params=args
4
+comment1.target=void\ main(java.lang.String[])
5
+numComments=2

+ 12
- 0
Main.java View File

1
 /**
1
 /**
2
  * Created by iyasuwatts on 10/17/17.
2
  * Created by iyasuwatts on 10/17/17.
3
  */
3
  */
4
+import java.util.Scanner;
4
 public class Main {
5
 public class Main {
5
 
6
 
6
     public static void main(String[] args ){
7
     public static void main(String[] args ){
8
+        Scanner fname = new Scanner(System.in);
9
+        String input = fname.nextLine();
10
+        String name = input;
11
+        
12
+        if(name == "Alice" || name == "Bob") {
13
+        System.out.println("Hi " + name);
14
+        }
15
+        
16
+        
17
+        
18
+        
7
 
19
 
8
     }
20
     }
9
 }
21
 }

+ 5
- 5
package.bluej View File

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=714
3
+editor.fx.0.width=800
4
+editor.fx.0.x=240
5
+editor.fx.0.y=23
6
 objectbench.height=101
6
 objectbench.height=101
7
-objectbench.width=776
7
+objectbench.width=461
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