Jose Bedolla 6 anni fa
parent
commit
0a467eefe3
7 ha cambiato i file con 113 aggiunte e 11 eliminazioni
  1. BIN
      Main.class
  2. 5
    0
      Main.ctxt
  3. 34
    0
      Main.java
  4. BIN
      MainTest.class
  5. 13
    0
      MainTest.ctxt
  6. 42
    0
      MainTest.java
  7. 19
    11
      package.bluej

BIN
Main.class Vedi File


+ 5
- 0
Main.ctxt Vedi File

@@ -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

+ 34
- 0
Main.java Vedi File

@@ -1,9 +1,43 @@
1 1
 /**
2 2
  * Created by iyasuwatts on 10/17/17.
3 3
  */
4
+import java.util.Scanner; //get access to the library
5
+
4 6
 public class Main {
5 7
 
6 8
     public static void main(String[] args ){
9
+        // SAVES INPUT
10
+        String name1;
11
+        String name2;
12
+
13
+        //get input
14
+        Scanner input = new Scanner(System.in);
15
+
16
+
17
+        System.out.println("Enter your name: ");
18
+        name1 = input.nextLine(); //assign first input
19
+
20
+        System.out.println("Enter other name: ");
21
+        name2 = input.nextLine();// assign second input
22
+
23
+        //make the names lowerCase
24
+        name1.toLowerCase();
25
+        name2.toLowerCase();
26
+
27
+        String nameSaver1 = name1;
28
+        String nameSaver2 = name2;
29
+
30
+        if((name1.equals(nameSaver1)||name1.equals(nameSaver2))&&((name2.equals(nameSaver1))||(name2.equals(nameSaver2))))
31
+        {
32
+            System.out.println("Hello!" + name1 +" "+ name2);
33
+        }
34
+        else
35
+        {
36
+            System.out.println("I do not know you guys!");
37
+            System.out.println("false ");
38
+        }
39
+
7 40
 
8 41
     }
42
+
9 43
 }

BIN
MainTest.class Vedi File


+ 13
- 0
MainTest.ctxt Vedi File

@@ -0,0 +1,13 @@
1
+#BlueJ class context
2
+comment0.target=MainTest
3
+comment0.text=\n\ The\ test\ class\ MainTest.\n\n\ @author\ \ (your\ name)\n\ @version\ (a\ version\ number\ or\ a\ date)\n
4
+comment1.params=
5
+comment1.target=MainTest()
6
+comment1.text=\n\ Default\ constructor\ for\ test\ class\ MainTest\n
7
+comment2.params=
8
+comment2.target=void\ setUp()
9
+comment2.text=\n\ Sets\ up\ the\ test\ fixture.\n\n\ Called\ before\ every\ test\ case\ method.\n
10
+comment3.params=
11
+comment3.target=void\ tearDown()
12
+comment3.text=\n\ Tears\ down\ the\ test\ fixture.\n\n\ Called\ after\ every\ test\ case\ method.\n
13
+numComments=4

+ 42
- 0
MainTest.java Vedi File

@@ -0,0 +1,42 @@
1
+
2
+
3
+import static org.junit.Assert.*;
4
+import org.junit.After;
5
+import org.junit.Before;
6
+import org.junit.Test;
7
+
8
+/**
9
+ * The test class MainTest.
10
+ *
11
+ * @author  (your name)
12
+ * @version (a version number or a date)
13
+ */
14
+public class MainTest
15
+{
16
+    /**
17
+     * Default constructor for test class MainTest
18
+     */
19
+    public MainTest()
20
+    {
21
+    }
22
+
23
+    /**
24
+     * Sets up the test fixture.
25
+     *
26
+     * Called before every test case method.
27
+     */
28
+    @Before
29
+    public void setUp()
30
+    {
31
+    }
32
+
33
+    /**
34
+     * Tears down the test fixture.
35
+     *
36
+     * Called after every test case method.
37
+     */
38
+    @After
39
+    public void tearDown()
40
+    {
41
+    }
42
+}

+ 19
- 11
package.bluej Vedi File

@@ -1,20 +1,20 @@
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=722
3
+editor.fx.0.width=800
4
+editor.fx.0.x=1332
5
+editor.fx.0.y=23
6 6
 objectbench.height=101
7 7
 objectbench.width=776
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=2240
13
+package.editor.y=154
14 14
 package.frame.height=600
15 15
 package.frame.width=800
16 16
 package.numDependencies=0
17
-package.numTargets=1
17
+package.numTargets=2
18 18
 package.showExtends=true
19 19
 package.showUses=true
20 20
 project.charset=UTF-8
@@ -24,9 +24,17 @@ 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=MainTest
28 28
 target1.showInterface=false
29
-target1.type=ClassTarget
29
+target1.type=UnitTestTargetJunit4
30 30
 target1.width=80
31
-target1.x=70
32
-target1.y=10
31
+target1.x=100
32
+target1.y=-20
33
+target2.association=MainTest
34
+target2.height=50
35
+target2.name=Main
36
+target2.showInterface=false
37
+target2.type=ClassTarget
38
+target2.width=80
39
+target2.x=70
40
+target2.y=10