diff --git a/src/main/java/com/booleanuk/core/Exercise.java b/src/main/java/com/booleanuk/core/Exercise.java index 7987028..cbdfd5f 100644 --- a/src/main/java/com/booleanuk/core/Exercise.java +++ b/src/main/java/com/booleanuk/core/Exercise.java @@ -52,19 +52,27 @@ public Exercise(int age) { provided to the name and age members */ + public Exercise(String name, int age){ + this.name = name; + this.age = age; + } /* 2. Create a method named add that accepts two integers. The method should return the numbers added together. */ - + public int add(int a, int b){ + return a+b; + } /* 3. Create another method named add that accepts two Strings. The method should return the strings concatenated together with a space in between. */ - + public String add(String a, String b){ + return a + " " + b; + } }