소스 검색

initial commit

L. Dolio Durant 6 년 전
커밋
ec7dac024b
9개의 변경된 파일157개의 추가작업 그리고 0개의 파일을 삭제
  1. 3
    0
      .gitignore
  2. 25
    0
      CR-Calcul8r/package.bluej
  3. BIN
      Operations.class
  4. 33
    0
      Operations.java
  5. 19
    0
      OperationsTest.java
  6. 12
    0
      README.TXT
  7. 5
    0
      README.md
  8. 42
    0
      package.bluej
  9. 18
    0
      pom.xml

+ 3
- 0
.gitignore 파일 보기

@@ -0,0 +1,3 @@
1
+.idea
2
+*.iml
3
+target/*

+ 25
- 0
CR-Calcul8r/package.bluej 파일 보기

@@ -0,0 +1,25 @@
1
+#BlueJ package file
2
+editor.fx.0.height=722
3
+editor.fx.0.width=800
4
+editor.fx.0.x=320
5
+editor.fx.0.y=75
6
+objectbench.height=101
7
+objectbench.width=776
8
+package.divider.horizontal=0.6
9
+package.divider.vertical=0.8007380073800738
10
+package.editor.height=427
11
+package.editor.width=674
12
+package.editor.x=40
13
+package.editor.y=43
14
+package.frame.height=600
15
+package.frame.width=800
16
+package.numDependencies=0
17
+package.numTargets=0
18
+package.showExtends=true
19
+package.showUses=true
20
+project.charset=UTF-8
21
+readme.height=58
22
+readme.name=@README
23
+readme.width=47
24
+readme.x=10
25
+readme.y=10

BIN
Operations.class 파일 보기


+ 33
- 0
Operations.java 파일 보기

@@ -0,0 +1,33 @@
1
+public class Operations {
2
+
3
+    /**
4
+     * The addition function.
5
+     * @param x The first operand
6
+     * @param y The second operand
7
+     * @return the sum of x and y
8
+     */
9
+    public static int add(int x, int y) {
10
+        return x + y;
11
+    }
12
+
13
+    /**
14
+     * The subtraction function
15
+     * @param x The first operand
16
+     * @param y The second operand
17
+     * @return y taken from x
18
+     */
19
+    public static int subtract(int x, int y) {
20
+        return x - y;
21
+    }
22
+    
23
+
24
+    /**
25
+     * The multiplication function
26
+     * @param x The first operand
27
+     * @param y The second operand
28
+     * @return x times y
29
+     */
30
+    public static int multiply(int x, int y) {
31
+        return x * y;
32
+    }
33
+}

+ 19
- 0
OperationsTest.java 파일 보기

@@ -0,0 +1,19 @@
1
+import org.junit.Test;
2
+import org.junit.Assert;
3
+
4
+public class OperationsTest {
5
+    @Test
6
+    public void testAdd() throws Exception {
7
+        Assert.assertEquals(2, Operations.add(1, 1));
8
+    }
9
+
10
+    @Test
11
+    public void testSubtract() throws Exception {
12
+        Assert.assertEquals(0, Operations.subtract(1, 1));
13
+    }
14
+
15
+    @Test
16
+    public void testMultiply() throws Exception {
17
+        Assert.assertEquals(4, Operations.multiply(2, 2));
18
+    }
19
+}

+ 12
- 0
README.TXT 파일 보기

@@ -0,0 +1,12 @@
1
+------------------------------------------------------------------------
2
+This is the project README file. Here, you should describe your project.
3
+Tell the reader (someone who does not know anything about this project)
4
+all he/she needs to know. The comments should usually include at least:
5
+------------------------------------------------------------------------
6
+
7
+PROJECT TITLE:
8
+PURPOSE OF PROJECT:
9
+VERSION or DATE:
10
+HOW TO START THIS PROJECT:
11
+AUTHORS:
12
+USER INSTRUCTIONS:

+ 5
- 0
README.md 파일 보기

@@ -0,0 +1,5 @@
1
+# Calcul8r
2
+
3
+## A guided Git walkthrough example
4
+
5
+This is the repo referenced in the git slides.

+ 42
- 0
package.bluej 파일 보기

@@ -0,0 +1,42 @@
1
+#BlueJ package file
2
+dependency1.from=OperationsTest
3
+dependency1.to=Operations
4
+dependency1.type=UsesDependency
5
+editor.fx.0.height=722
6
+editor.fx.0.width=800
7
+editor.fx.0.x=320
8
+editor.fx.0.y=75
9
+objectbench.height=164
10
+objectbench.width=776
11
+package.divider.horizontal=0.6
12
+package.divider.vertical=0.6845018450184502
13
+package.editor.height=364
14
+package.editor.width=674
15
+package.editor.x=-1455
16
+package.editor.y=82
17
+package.frame.height=600
18
+package.frame.width=800
19
+package.numDependencies=1
20
+package.numTargets=2
21
+package.showExtends=true
22
+package.showUses=true
23
+project.charset=UTF-8
24
+readme.height=58
25
+readme.name=@README
26
+readme.width=47
27
+readme.x=10
28
+readme.y=10
29
+target1.height=50
30
+target1.name=OperationsTest
31
+target1.showInterface=false
32
+target1.type=UnitTestTargetJunit4
33
+target1.width=120
34
+target1.x=100
35
+target1.y=10
36
+target2.height=50
37
+target2.name=Operations
38
+target2.showInterface=false
39
+target2.type=ClassTarget
40
+target2.width=90
41
+target2.x=70
42
+target2.y=70

+ 18
- 0
pom.xml 파일 보기

@@ -0,0 +1,18 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0"
3
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
+    <modelVersion>4.0.0</modelVersion>
6
+
7
+    <groupId>io.zipcoder</groupId>
8
+    <artifactId>calcul8r</artifactId>
9
+    <version>1.0-SNAPSHOT</version>
10
+
11
+        <dependencies>
12
+            <dependency>
13
+                <groupId>junit</groupId>
14
+                <artifactId>junit</artifactId>
15
+                <version>4.12</version>
16
+            </dependency>
17
+        </dependencies>
18
+</project>