diff --git a/README.md b/README.md index 437e760..c697fcb 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ An exercise for collaborating with git / GitHub. Please read the directions CARE ## Making a change to the README We will first practice making changes that do not trigger a merge conflict. In general, this is what we hope to happen! -1. Partner A will make changes first. ONLY PARTNER A SHOULD DO THESE SUB STEPS to add, commit, and push the changes. +1. Partner A will make changes first. ONLY PARTNER A SHOULD DO THESE SUB STEPS to add, commit, and push the changes. (THIS IS MY CHANGE!!!!!! WOOAAAAHHHHHHH!!!!!) 1. Do a git pull. You should get a message saying you're up to date. ``` git pull @@ -67,7 +67,9 @@ 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 +"THIS IS CRAZYYY!!!!"; +"WOAHH"; + ``` 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: @@ -137,4 +139,6 @@ Try updating the program so that it can handle multiple lines of text. Or make a [Deer](art/deer.txt) +[Cat](art/cat.txt) + diff --git a/art/cat.txt b/art/cat.txt new file mode 100644 index 0000000..05188c4 --- /dev/null +++ b/art/cat.txt @@ -0,0 +1,3 @@ + /\_/\ +( o.o ) + > ^ < \ No newline at end of file diff --git a/src/Animal.java b/src/Animal.java index 6f278b2..7302b83 100644 --- a/src/Animal.java +++ b/src/Animal.java @@ -3,7 +3,7 @@ * Classes implementing this interface should provide their specific animal artwork * and override the toString method to return the name of the animal. */ -interface Animal { +public interface Animal { /** * Returns the ASCII art representation of the animal. diff --git a/src/Dog.java b/src/Dog.java new file mode 100644 index 0000000..bd8f0fe --- /dev/null +++ b/src/Dog.java @@ -0,0 +1,18 @@ +public 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..4a33a4b 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()); } /**