Nira Parikh 6 år sedan
förälder
incheckning
f96cac0f91
4 ändrade filer med 36 tillägg och 13 borttagningar
  1. Binär
      Main.class
  2. 5
    0
      Main.ctxt
  3. 21
    3
      Main.java
  4. 10
    10
      package.bluej

Binär
Main.class Visa fil


+ 5
- 0
Main.ctxt Visa fil

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

+ 21
- 3
Main.java Visa fil

@@ -1,9 +1,27 @@
1 1
 /**
2 2
  * Created by iyasuwatts on 10/17/17.
3 3
  */
4
-public class Main {
5 4
 
6
-    public static void main(String[] args ){
5
+import java.util.Scanner;
6
+public class Main {
7 7
 
8
+    public static void main (String[] args ){
9
+        Scanner input = new Scanner(System.in);
10
+        System.out.println ("Enter Name:" );
11
+       String name = input.nextLine();
12
+        
13
+       if(name.equals ("Alice")){
14
+            System.out.println ("Hi Alice");
15
+        } 
16
+        else if (name.equals ("Bob")){
17
+           System.out.println ("Hi Bob");
18
+           }
19
+           else {
20
+            System.out.println ("Go Away!");
21
+        }      
8 22
     }
9
-}
23
+    
24
+    }
25
+           
26
+           
27
+

+ 10
- 10
package.bluej Visa fil

@@ -1,17 +1,17 @@
1 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=480
5
+editor.fx.0.y=23
6 6
 objectbench.height=101
7
-objectbench.width=776
7
+objectbench.width=461
8 8
 package.divider.horizontal=0.6
9
-package.divider.vertical=0.8007380073800738
10
-package.editor.height=427
9
+package.divider.vertical=0.7567567567567568
10
+package.editor.height=329
11 11
 package.editor.width=674
12
-package.editor.x=181
13
-package.editor.y=109
14
-package.frame.height=600
12
+package.editor.x=480
13
+package.editor.y=118
14
+package.frame.height=502
15 15
 package.frame.width=800
16 16
 package.numDependencies=0
17 17
 package.numTargets=1