diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..540cdbc --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +unit-1-bootcamp-assessment \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..a852314 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..d821048 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/libraries/lib.xml b/.idea/libraries/lib.xml new file mode 100644 index 0000000..3df2b40 --- /dev/null +++ b/.idea/libraries/lib.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..21037f5 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7 + + + + + + + + 1.7 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..8928d91 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml new file mode 100644 index 0000000..922003b --- /dev/null +++ b/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..9ba68ff --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,553 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1432855611365 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index c02997c..e017195 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # unit-1-bootcamp -1. Fork this repository. In your README, mark down your start time. +1. Fork this repository. In your README, mark down your start time. : 7:25 5/28/15 2. Create a new class, `MyObject`. A `MyObject` has a name (`String`) and an age (`int`). @@ -23,7 +23,7 @@ Test Start time: Thu May 28, 7:00pm EST -My End time: `` +My End time: 7:49pm 5/28/15 Test End time: Fri May 29, 10:00pm EST diff --git a/out/production/unit-1-bootcamp-assessment/Exercises$Child.class b/out/production/unit-1-bootcamp-assessment/Exercises$Child.class new file mode 100644 index 0000000..a39226f Binary files /dev/null and b/out/production/unit-1-bootcamp-assessment/Exercises$Child.class differ diff --git a/out/production/unit-1-bootcamp-assessment/Exercises$Parent.class b/out/production/unit-1-bootcamp-assessment/Exercises$Parent.class new file mode 100644 index 0000000..c49127c Binary files /dev/null and b/out/production/unit-1-bootcamp-assessment/Exercises$Parent.class differ diff --git a/out/production/unit-1-bootcamp-assessment/Exercises.class b/out/production/unit-1-bootcamp-assessment/Exercises.class new file mode 100644 index 0000000..ca26735 Binary files /dev/null and b/out/production/unit-1-bootcamp-assessment/Exercises.class differ diff --git a/out/production/unit-1-bootcamp-assessment/MyNode.class b/out/production/unit-1-bootcamp-assessment/MyNode.class new file mode 100644 index 0000000..543daef Binary files /dev/null and b/out/production/unit-1-bootcamp-assessment/MyNode.class differ diff --git a/out/production/unit-1-bootcamp-assessment/MyObject.class b/out/production/unit-1-bootcamp-assessment/MyObject.class new file mode 100644 index 0000000..2b51da1 Binary files /dev/null and b/out/production/unit-1-bootcamp-assessment/MyObject.class differ diff --git a/out/production/unit-1-bootcamp-assessment/MyObjectNode.class b/out/production/unit-1-bootcamp-assessment/MyObjectNode.class new file mode 100644 index 0000000..48297a6 Binary files /dev/null and b/out/production/unit-1-bootcamp-assessment/MyObjectNode.class differ diff --git a/out/production/unit-1-bootcamp-assessment/Tests.class b/out/production/unit-1-bootcamp-assessment/Tests.class new file mode 100644 index 0000000..a94d975 Binary files /dev/null and b/out/production/unit-1-bootcamp-assessment/Tests.class differ diff --git a/src/Exercises.java b/src/Exercises.java index ac85d45..fd8eadf 100644 --- a/src/Exercises.java +++ b/src/Exercises.java @@ -1,11 +1,11 @@ public class Exercises { static class Parent { - public String doStuff() { return ""; } + 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/MyObject.java b/src/MyObject.java new file mode 100644 index 0000000..be521c1 --- /dev/null +++ b/src/MyObject.java @@ -0,0 +1,82 @@ +/** + * Created by c4q-john on 5/28/15. + */ +public class MyObject +{ + + + public MyObject(int age) + { + this.age = age; + } + + public MyObject(String name, int age) + { + this.name = name; + this.age = age; + + } + + public String name; + public int age; + + public MyObject() + { + + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public int getAge() + { + return age; + } + + public void setAge(int age) + { + this.age = age; + } + + @Override + public boolean equals(Object o) + { + if(this == o) + { + return true; + } + if(! (o instanceof MyObject)) + { + return false; + } + + MyObject myObject = (MyObject) o; + + if(age != myObject.age) + { + return false; + } + if(name != null + ? ! name.equals(myObject.name) + : myObject.name != null) + { + return false; + } + + return true; + } + + public static void main(String[] args) + { + MyObject michael = new MyObject("Michael Jackson",50); + System.out.println(michael.getName()+michael.getAge()); + } + +} diff --git a/src/MyObjectNode.java b/src/MyObjectNode.java new file mode 100644 index 0000000..1658c48 --- /dev/null +++ b/src/MyObjectNode.java @@ -0,0 +1,44 @@ +/** + * Created by c4q-john on 5/28/15. + */ +public class MyObjectNode extends MyNode +{ + @Override + public MyNode getLeft() + { + return null; + } + + @Override + public MyNode getRight() + { + return null; + } + + @Override + public Object getData() + { + return null; + } + + @Override + public void insert(MyNode newNode) + { + + } + + public MyNode setLeft() + { + return null; + } + + public MyNode setRight() + { + return null; + } + + public MyNode setData() + { + return null; + } +} 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()); } diff --git a/unit-1-bootcamp-assessment.iml b/unit-1-bootcamp-assessment.iml new file mode 100644 index 0000000..fb8e866 --- /dev/null +++ b/unit-1-bootcamp-assessment.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file