-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Used static imports to simpify the math calls
- Loading branch information
1 parent
2956e1d
commit 369adba
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import static Square.square | ||
import static Sum.sum | ||
|
||
def name = "Matthew" | ||
int programmingPoints = 10 | ||
|
||
println "Hello ${name}" | ||
println "${name} has at least ${programmingPoints} programming points." | ||
println "${programmingPoints} squared is ${Square.square(programmingPoints)}" | ||
println "${programmingPoints} plus 3 bonus points is ${Sum.sum(programmingPoints, 3)}" | ||
println "${programmingPoints} squared is ${square(programmingPoints)}" | ||
println "${programmingPoints} plus 3 bonus points is ${sum(programmingPoints, 3)}" |