diff --git a/README.md b/README.md index c02997c..1fe6228 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,10 @@ 10. Submit a pull request with all your code. -Test Start time: Thu May 28, 7:00pm EST +Test Start time: Fri May 29, 8:45PM EST -My End time: `` +My End time: `Fri May 29, 9:36pm EST` Test End time: Fri May 29, 10:00pm EST -Total time: 27 hours +Total time: 51 minutes diff --git a/src/Exercises.java b/src/Exercises.java index ac85d45..e705d4b 100644 --- a/src/Exercises.java +++ b/src/Exercises.java @@ -1,11 +1,16 @@ public class Exercises { static class Parent { - public String doStuff() { return ""; } + + public Parent(){ + + } + + public String doStuff() { return "parent"; } } static class Child extends Parent { - public String doStuff() { return ""; } - public String doStuff(String s) { return ""; } + public String doStuff() { return "child"; } + public String doStuff(String s) { return "Howdy"; } } diff --git a/src/MyNode.java b/src/MyNode.java index 54f3213..3795de3 100644 --- a/src/MyNode.java +++ b/src/MyNode.java @@ -2,9 +2,9 @@ * Created by amyquispe on 5/28/15. */ public abstract class MyNode { - private MyNode left; - private MyNode right; - private T data; + protected MyNode left; + protected MyNode right; + protected T data; public abstract MyNode getLeft(); diff --git a/src/MyObject.java b/src/MyObject.java new file mode 100644 index 0000000..f43ccb4 --- /dev/null +++ b/src/MyObject.java @@ -0,0 +1,31 @@ +/** + * Created by c4q-rosmary on 5/29/15. + */ +public class MyObject +{ + public String name; + public int age; + + public MyObject (String name, int age){ + this.name = name; + this.age = age; + } + + public String getName (){ + return this.name; + } + + public void setName(String name){ + this.name = name; + } + + public int getAge(){ + return this.age; + } + + public void setAge(int age){ + this.age = age; + } + + +} diff --git a/src/MyObjectNode.java b/src/MyObjectNode.java new file mode 100644 index 0000000..ca7c33a --- /dev/null +++ b/src/MyObjectNode.java @@ -0,0 +1,43 @@ +/** + * Created by c4q-rosmary on 5/29/15. + */ +public class MyObjectNode extends MyNode +{ + + @Override + public MyNode getLeft() + { + return this.left; + } + + public void setLeft(MyNode left){ + this.left = left; + } + + + @Override + public MyNode getRight() + { + return this.right; + } + + public void setRight(MyNode right){ + this.right = right; + } + + @Override + public Object getData() + { + return this.data; + } + + public void setData(MyNode data) { + this.data = data; + } + + @Override + public void insert(MyNode newNode) + { + + } +} diff --git a/src/Tests.java b/src/Tests.java index 377c274..7311397 100644 --- a/src/Tests.java +++ b/src/Tests.java @@ -44,7 +44,7 @@ public void test04MyObjectNodeImplementsSetters() throws Exception { ClassLoader cl = ClassLoader.getSystemClassLoader(); Class klass = cl.loadClass("MyObjectNode"); Method[] methods = klass.getMethods(); - ArrayList methodNames = new ArrayList<>(); + ArrayList methodNames = new ArrayList(); for (Method m : methods){ methodNames.add(m.getName()); } @@ -60,7 +60,7 @@ public void test05MyObjectHasNameAndAge() throws Exception { Class klass = cl.loadClass("MyObject"); Method[] methods = klass.getMethods(); - ArrayList methodNames = new ArrayList<>(); + ArrayList methodNames = new ArrayList(); for (Method m : methods){ methodNames.add(m.getName()); }