There was an error while loading. Please reload this page.
1 parent 32c2737 commit dc64fe4Copy full SHA for dc64fe4
src/Main.groovy
@@ -1,12 +1,8 @@
1
+import Square
2
+
3
def name = "Matthew"
4
+int programmingPoints = 10
5
6
println "Hello ${name}"
-
-int programmingPoints = 10
7
println "${name} has at least ${programmingPoints} programming points."
8
-println "${programmingPoints} squared is ${square(programmingPoints)}"
9
10
-int square(int base) {
11
-base * base
12
-}
+println "${programmingPoints} squared is ${Square.square(programmingPoints)}"
src/Square.groovy
@@ -0,0 +1,3 @@
+static int square(int base) {
+base * base
+}
0 commit comments