Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completed test - RosmaryFC #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: `<insert here>`
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
11 changes: 8 additions & 3 deletions src/Exercises.java
Original file line number Diff line number Diff line change
@@ -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"; }
}


Expand Down
6 changes: 3 additions & 3 deletions src/MyNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Created by amyquispe on 5/28/15.
*/
public abstract class MyNode<T> {
private MyNode left;
private MyNode right;
private T data;
protected MyNode left;
protected MyNode right;
protected T data;

public abstract MyNode getLeft();

Expand Down
31 changes: 31 additions & 0 deletions src/MyObject.java
Original file line number Diff line number Diff line change
@@ -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;
}


}
43 changes: 43 additions & 0 deletions src/MyObjectNode.java
Original file line number Diff line number Diff line change
@@ -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)
{

}
}
4 changes: 2 additions & 2 deletions src/Tests.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void test04MyObjectNodeImplementsSetters() throws Exception {
ClassLoader cl = ClassLoader.getSystemClassLoader();
Class<?> klass = cl.loadClass("MyObjectNode");
Method[] methods = klass.getMethods();
ArrayList<String> methodNames = new ArrayList<>();
ArrayList<String> methodNames = new ArrayList<String>();
for (Method m : methods){
methodNames.add(m.getName());
}
Expand All @@ -60,7 +60,7 @@ public void test05MyObjectHasNameAndAge() throws Exception {
Class<?> klass = cl.loadClass("MyObject");

Method[] methods = klass.getMethods();
ArrayList<String> methodNames = new ArrayList<>();
ArrayList<String> methodNames = new ArrayList<String>();
for (Method m : methods){
methodNames.add(m.getName());
}
Expand Down