From 7d00b4b2d15f2b21084b67dfed86afea66769dca Mon Sep 17 00:00:00 2001 From: Gabby-Moon <194023457+Gabby-Moon@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:27:19 -0800 Subject: [PATCH 1/7] updated header for file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 437e760..8763d87 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! I recommend focusing on the changes to the README file 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!!! From 211827ffa34065610dd7fcdab4f85a3eece5327b Mon Sep 17 00:00:00 2001 From: Maple <135763163+maple-johnson@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:30:50 -0800 Subject: [PATCH 2/7] Added a new section on working together --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 8763d87..6cd1719 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # grcsay 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!!! ``` From 19ecea59fa1349e8670320a04f06543740bb5ed1 Mon Sep 17 00:00:00 2001 From: Maple <135763163+maple-johnson@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:33:29 -0800 Subject: [PATCH 3/7] Edited required line --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6cd1719..42b0b85 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,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 + Hi friends! How are you doing today? ``` 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 663909cdf3645afa369effcc055b0a61a6614570 Mon Sep 17 00:00:00 2001 From: Gabby-Moon <194023457+Gabby-Moon@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:33:54 -0800 Subject: [PATCH 4/7] added text for conflict --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6cd1719..134ad1b 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,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 + 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: From 3e6d9d54f5d27fe895611615501f1fd919ecbba0 Mon Sep 17 00:00:00 2001 From: Maple <135763163+maple-johnson@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:55:56 -0800 Subject: [PATCH 5/7] Added a new Dog class for a dog option. --- src/Dog.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/Dog.java 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"; + } + +} From 26c3d78d449a072b437eace8c857147769207ee7 Mon Sep 17 00:00:00 2001 From: Gabby-Moon <194023457+Gabby-Moon@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:56:37 -0800 Subject: [PATCH 6/7] added a deer --- src/Deer.java | 19 +++++++++++++++++++ src/SayApp.java | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/Deer.java 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/SayApp.java b/src/SayApp.java index 9d3bbf7..173cfa2 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()); } /** From 3c0bc4611f7468379c1e4a623aa09ef738f0434c Mon Sep 17 00:00:00 2001 From: Maple <135763163+maple-johnson@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:57:32 -0800 Subject: [PATCH 7/7] Connected SayApp to the Dog file. --- src/SayApp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); } /**