diff --git a/README.md b/README.md index 437e760..ad9bcd1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # 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! I recommend focusing on the changes to the README file before reading the Java code. + +# Working together +All partners should work together! It'll be fun! Good luck! Don't be afraid to ask any questions. ## Setting up git merging strategy 1. Each partner should run these commands on their own terminal. DO NOT SKIP THIS PART!!! @@ -67,7 +70,8 @@ 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 + Hi friends! Make a conflict here + ``` 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..69f5872 --- /dev/null +++ b/src/Deer.java @@ -0,0 +1,19 @@ +class Deer implements Animal{ + // Art from https://www.asciiart.eu/animals/deer + + @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..3c827cf --- /dev/null +++ b/src/Dog.java @@ -0,0 +1,20 @@ +// ASCII Art By Maija Haavisto https://www.asciiart.eu/animals/dogs + +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..7da051a 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 Deer(), new Dog()); } /**