Browse Source

Program written and tested.

Lauren Green 6 years ago
parent
commit
dd12baceb2
4 changed files with 21 additions and 10 deletions
  1. BIN
      Main.class
  2. 5
    0
      Main.ctxt
  3. 10
    4
      Main.java
  4. 6
    6
      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

+ 10
- 4
Main.java View File

1
-/**
2
- * Created by iyasuwatts on 10/17/17.
3
- */
1
+import java.util.Scanner;
2
+
4
 public class Main {
3
 public class Main {
5
 
4
 
6
     public static void main(String[] args ){
5
     public static void main(String[] args ){
7
-
6
+        Scanner in = new Scanner(System.in);
7
+        System.out.print("What is your name?");
8
+        String name = in.nextLine();
9
+        String alice = "Alice";
10
+        String bob = "Bob";
11
+        if (name.equalsIgnoreCase(alice) || name.equalsIgnoreCase(bob)) {
12
+            System.out.println("Hi " + name + ", welcome to my program.");
13
+        }
8
     }
14
     }
9
 }
15
 }

+ 6
- 6
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=709
3
+editor.fx.0.width=800
4
+editor.fx.0.x=723
5
+editor.fx.0.y=23
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=89
13
+package.editor.y=273
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