#34 mdimarino

오픈
mdimarino mdimarino/ZCW-SumOfInput-BlueJ:master 에서 master 로 1 commits 를 머지하려 합니다
7개의 변경된 파일91개의 추가작업 그리고 12개의 파일을 삭제
  1. BIN
      Main.class
  2. 5
    0
      Main.ctxt
  3. 12
    1
      Main.java
  4. BIN
      MainTest.class
  5. 13
    0
      MainTest.ctxt
  6. 42
    0
      MainTest.java
  7. 19
    11
      package.bluej

BIN
Main.class 파일 보기


+ 5
- 0
Main.ctxt 파일 보기

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

+ 12
- 1
Main.java 파일 보기

@@ -1,9 +1,20 @@
1 1
 /**
2 2
  * Created by iyasuwatts on 10/17/17.
3 3
  */
4
+import java.util.Scanner;
4 5
 public class Main {
5
-
6 6
     public static void main(String[] args){
7
+        Scanner in = new Scanner(System.in);
8
+        System.out.print("Enter a Number:");
9
+        String y = in.next();
10
+
11
+        int n = Integer.parseInt(y);
12
+        int sumOfN;
13
+
14
+        for (int i = 1; i <= n; i++){
15
+            sumOfN =+ i;
16
+
17
+        }
7 18
 
8 19
     }
9 20
 }

BIN
MainTest.class 파일 보기


+ 13
- 0
MainTest.ctxt 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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=716
3
+editor.fx.0.width=800
4
+editor.fx.0.x=357
5
+editor.fx.0.y=23
6 6
 objectbench.height=164
7 7
 objectbench.width=776
8 8
 package.divider.horizontal=0.6
9 9
 package.divider.vertical=0.6845018450184502
10 10
 package.editor.height=364
11 11
 package.editor.width=674
12
-package.editor.x=-816
13
-package.editor.y=445
12
+package.editor.x=112
13
+package.editor.y=72
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=240
32
+target1.y=150
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=210
40
+target2.y=180