From 4797c9ec88e513c08f8ac018cdc871649d276177 Mon Sep 17 00:00:00 2001 From: Abdi <89213120+abdirashidexe@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:22:15 -0800 Subject: [PATCH 1/7] made a change a step --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 437e760..9e5293a 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ We will first practice making changes that do not trigger a merge conflict. In g ``` git pull ``` - 1. Make any change to the README and save it. + 1. Make any change to the README and save it. This is the change. 1. Check that the change shows up in red (shows as unstaged) when asking for the status. ``` git status From e0a553b2ab0a835ce6624b4edefaa8df2511d03e Mon Sep 17 00:00:00 2001 From: rjfredr Date: Tue, 14 Jan 2025 11:23:15 -0800 Subject: [PATCH 2/7] partner b commit --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 9e5293a..35ab59c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +# partner B change +This is partner B's change + # 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. From ccbd4571b2fb4eb6a1aadaa5bab5898a0a45f0d4 Mon Sep 17 00:00:00 2001 From: Abdi <89213120+abdirashidexe@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:25:27 -0800 Subject: [PATCH 3/7] edited a line to trigger merge conflict --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 35ab59c..8b06a82 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 + partner a is awesome ``` 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 0f5f1f3c67be6112f1df13b3defaba9ff37545e4 Mon Sep 17 00:00:00 2001 From: rjfredr Date: Tue, 14 Jan 2025 11:25:38 -0800 Subject: [PATCH 4/7] mergeconflict --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 35ab59c..4039112 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 + Efren "Bata" Reyes ``` 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 d67fa0e76fc051aac1c465b36c49af708ee2e184 Mon Sep 17 00:00:00 2001 From: rjfredr Date: Tue, 14 Jan 2025 11:32:42 -0800 Subject: [PATCH 5/7] add deer.java --- src/deer.java | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/deer.java diff --git a/src/deer.java b/src/deer.java new file mode 100644 index 0000000..8f4ef50 --- /dev/null +++ b/src/deer.java @@ -0,0 +1,37 @@ +/** + * The deer class represents a deer and provides its ASCII art representation. + * This class implements the Animal interface and overrides the getAnimalArt + * and toString methods. + * + * deer by Tony Monroe. See license file for more details. + */ +class deer implements Animal { + + /** + * Returns the ASCII art representation of the deer. + * + * @return A string containing the ASCII art of the deer. + */ + @Override + public String getAnimalArt() { + return + " \\ ( )\n" + + " \\ `--(_ _)--\'\n" + + " \\ Y-Y\n" + + " \\ /@@ \\\n" + + " \\ / \\\n" + + " `--\'. \\ ,\n" + + " | `.__________/)"; + } + + /** + * Returns the name of the animal ("deer"). + * This method overrides the toString method to return the name of the deer. + * + * @return The string "deer" representing the name of the animal. + */ + @Override + public String toString() { + return "deer"; + } +} From 5af4aa9f052e79e16946dd0b53ab03cacc1bebb7 Mon Sep 17 00:00:00 2001 From: Abdi <89213120+abdirashidexe@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:36:46 -0800 Subject: [PATCH 6/7] added dog.java --- src/Dog.java | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/Dog.java diff --git a/src/Dog.java b/src/Dog.java new file mode 100644 index 0000000..f13caa3 --- /dev/null +++ b/src/Dog.java @@ -0,0 +1,34 @@ +/** + * The Dog class represents a dog and provides its ASCII art. + * This class implements the Animal interface and overrides + * the getAnimalArt and toString methods. + * + * Dog by Maija Haavisto. + */ + +class Dog implements Animal { + /** + * Returns the ASCII art represnetation of the dog. + * + * @return A string containing the ASCII art of the dog. + */ + @Override + public String getAnimalArt() { + return + " \\ .\n" + + " \\ ..^____/\n" + + " `-. ___ )\n" + + " || ||\n"; + } + + /** + * Returns the name of the animal ("dog"). + * This method overrides the toString method to return the name of the dog. + * + * @return The string "dog" representing the name of the animal. + */ + @Override + public String toString() { + return "dog"; + } +} From d1677a585911351bc0947a89a43db28ce785968e Mon Sep 17 00:00:00 2001 From: rjfredr Date: Tue, 14 Jan 2025 11:40:04 -0800 Subject: [PATCH 7/7] added deer/dog.java on animalList --- src/SayApp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SayApp.java b/src/SayApp.java index 9d3bbf7..6b1083f 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()); } /**