From 326b53112c3435f7e598f19deecc4a0e6dfce301 Mon Sep 17 00:00:00 2001 From: Alex_Borovets Date: Thu, 16 Jan 2025 00:30:28 -0800 Subject: [PATCH 1/6] This is my change I'm so excited --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 437e760..e8eb0d6 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 From 05229259a3fac0e8d4de3481de20a4c1bb896dd5 Mon Sep 17 00:00:00 2001 From: Alex_Borovets Date: Thu, 16 Jan 2025 00:32:31 -0800 Subject: [PATCH 2/6] This is crazy --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e8eb0d6..c7cb565 100644 --- a/README.md +++ b/README.md @@ -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 + THIS IS CRAZYYY!!!! ``` 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: From 2afd50ea2a3971ab244b6283a2c5692569de4ab0 Mon Sep 17 00:00:00 2001 From: Alex_Borovets Date: Thu, 16 Jan 2025 00:42:51 -0800 Subject: [PATCH 3/6] Resolved merge conflict --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c7cb565..f510f72 100644 --- a/README.md +++ b/README.md @@ -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. ``` - THIS IS CRAZYYY!!!! +"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: From c97945a3e253bff8d243edd8418794f61e92058c Mon Sep 17 00:00:00 2001 From: Alex_Borovets Date: Thu, 16 Jan 2025 01:06:19 -0800 Subject: [PATCH 4/6] Creating a dog class --- README.md | 2 ++ src/Dog.java | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/Dog.java diff --git a/README.md b/README.md index f510f72..c697fcb 100644 --- a/README.md +++ b/README.md @@ -139,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/src/Dog.java b/src/Dog.java new file mode 100644 index 0000000..583a4bf --- /dev/null +++ b/src/Dog.java @@ -0,0 +1,18 @@ +public class Dog { + public class Dog implements Animal { + + @Override + public String getAnimalArt() { + return "\\ .\n" + +" \\ ..^____/\n" + +" `-. ___ )\n" + +" || ||\n"; + } + + @Override + public String toString() { + return "Dog"; + } + } + +} From 3ff959ad2945a931bb780227c6945cc561e02702 Mon Sep 17 00:00:00 2001 From: Alex_Borovets Date: Thu, 16 Jan 2025 01:29:22 -0800 Subject: [PATCH 5/6] Fixed up a few bugs --- src/Animal.java | 2 +- src/Dog.java | 30 +++++++++++++++--------------- src/SayApp.java | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) 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 index 583a4bf..bd8f0fe 100644 --- a/src/Dog.java +++ b/src/Dog.java @@ -1,18 +1,18 @@ -public class Dog { - public class Dog implements Animal { +public class Dog implements Animal { - @Override - public String getAnimalArt() { - return "\\ .\n" + -" \\ ..^____/\n" + -" `-. ___ )\n" + -" || ||\n"; - } - - @Override - public String toString() { - return "Dog"; - } + @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()); } /** From e96fca96d410839d1a9811a8c03ea5061fd9764c Mon Sep 17 00:00:00 2001 From: Alex_Borovets Date: Thu, 16 Jan 2025 01:32:17 -0800 Subject: [PATCH 6/6] I didn't end up using the cat:(( --- art/cat.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 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