Skip to content
This repository was archived by the owner on Jan 24, 2020. It is now read-only.

Commit 2a52e96

Browse files
Merge branches 'feature_division_polished' and 'feature_subtraction_polished'
Conflicts: src/Main.groovy Solved by bringing in both features (both imports, both calls)
2 parents 57d0bf6 + 818f033 commit 2a52e96

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Main.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import static Square.square
22
import static Division.divide
3+
import static Subtract.subtract
34
import static Sum.sum
45

56
def name = "Matthew"
@@ -9,4 +10,5 @@ println "Hello ${name}"
910
println "${name} has at least ${programmingPoints} programming points."
1011
println "${programmingPoints} squared is ${square(programmingPoints)}"
1112
println "${programmingPoints} divided by 2 bonus points is ${divide(programmingPoints, 2)}"
13+
println "${programmingPoints} minus 7 bonus points is ${subtract(programmingPoints, 7)}"
1214
println "${programmingPoints} plus 3 bonus points is ${sum(programmingPoints, 3)}"

src/Subtract.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
static int subtract(int val1, val2) {
2+
val1 - val2
3+
}

0 commit comments

Comments
 (0)