diff --git a/README.md b/README.md index 437e760..ae74349 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # grcsay -An exercise for collaborating with git / GitHub. Please read the directions CAREFULLY! I recommend focusing on the changes to the README before reading the Java code. +An exercise for collaborating with git / GitHub. Please read the directions CAREFULLY! <-too many ! I recommend focusing on the changes to the README before reading the Java code. ## Setting up git merging strategy 1. Each partner should run these commands on their own terminal. DO NOT SKIP THIS PART!!! @@ -67,7 +67,7 @@ We will now artificially trigger a merge conflict. When we follow good git pract 1. Have BOTH Partner A and Partner B edit the below line. Each person should make it say something different. ``` - EDIT THIS LINE + Hello Dani Developer! ``` 1. Have BOTH Partner A and Partner B add, commit, and push the changes. You can refer to the above steps for a refresher on how to add/commit/push. One of the partners will get an error saying that their changes can't be pushed. This is OK and expected. Today we are practicing how to resolve this error. 1. Have the error partner pull the other partner's changes: diff --git a/src/Deer.java b/src/Deer.java new file mode 100644 index 0000000..62699f9 --- /dev/null +++ b/src/Deer.java @@ -0,0 +1,18 @@ +class Deer implements Animal { + + @Override + public String getAnimalArt() { + return " \\ ( )\n" + +" \\ `--(_ _)--\'\n" + +" \\ Y-Y\n" + +" \\ /@@ \\\n" + +" \\ / \\\n" + +" `--\'. \\ ,\n" + +" | `.__________/)"; + } + + @Override + public String toString() { + return "Deer"; + } +} diff --git a/src/Dog.java b/src/Dog.java new file mode 100644 index 0000000..06e6677 --- /dev/null +++ b/src/Dog.java @@ -0,0 +1,14 @@ +class Dog implements Animal{ + @Override + public String getAnimalArt(){ + return " \\ .\n" + + " \\ ..^____/\n" + + " `-. ___ )\n" + + " || ||\n"; + } + + @Override + public String toString(){ + return "dog"; + } +} diff --git a/src/SayApp.java b/src/SayApp.java index 9d3bbf7..73e6d00 100644 --- a/src/SayApp.java +++ b/src/SayApp.java @@ -76,7 +76,7 @@ public static Animal getAnimalChoice(Scanner scanner) { * @return A list of Animal objects. */ public static List animalList() { - return Arrays.asList(new Cow(), new Duck()); + return Arrays.asList(new Cow(), new Duck(), new Dog(), new Deer()); } /**