From f8bcfc9a1c045191a4b0a57bb44d5fc20a99244f Mon Sep 17 00:00:00 2001 From: mlarsen <174657206+mlarsen-source@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:35:46 -0800 Subject: [PATCH 1/6] Added my Name --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 437e760..01771f4 100644 --- a/README.md +++ b/README.md @@ -138,3 +138,4 @@ Try updating the program so that it can handle multiple lines of text. Or make a [Deer](art/deer.txt) +Hello my name is Matthew. From e6bb64170bad2f0069e8d307efeb15d1e260d888 Mon Sep 17 00:00:00 2001 From: JSaiyan <183049245+JSaiyan@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:39:30 -0800 Subject: [PATCH 2/6] Added my name --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 01771f4..7d171f1 100644 --- a/README.md +++ b/README.md @@ -139,3 +139,4 @@ Try updating the program so that it can handle multiple lines of text. Or make a Hello my name is Matthew. +Hello my name is Justin. From 70fdeb12c205c1191cb6f8b7028258edd292607a Mon Sep 17 00:00:00 2001 From: mlarsen <174657206+mlarsen-source@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:41:44 -0800 Subject: [PATCH 3/6] made edits to the line --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d171f1..cc29526 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 + I have eddited this line - Matthew ``` 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 dfa8522afa41f65082fce2fdcf3d00f186717ece Mon Sep 17 00:00:00 2001 From: JSaiyan <183049245+JSaiyan@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:41:56 -0800 Subject: [PATCH 4/6] Edit this linegit status! --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d171f1..494e2e7 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 + EDIT THIS LINE!!! ``` 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 b75c26acf80e29963d0e438a12874542e7d29e61 Mon Sep 17 00:00:00 2001 From: mlarsen <174657206+mlarsen-source@users.noreply.github.com> Date: Tue, 14 Jan 2025 12:07:55 -0800 Subject: [PATCH 5/6] Created Dog Class and added to animal list --- src/Dog.java | 36 ++++++++++++++++++++++++++++++++++++ src/SayApp.java | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 src/Dog.java diff --git a/src/Dog.java b/src/Dog.java new file mode 100644 index 0000000..850927f --- /dev/null +++ b/src/Dog.java @@ -0,0 +1,36 @@ +public class Dog implements Animal { + +/** + * The Dog class represents a dogand provides its ASCII art representation. + * This class implements the Animal interface and overrides the getAnimalArt + * and toString methods. + * + */ + + + /** + * Returns the ASCII art representation of the dog. + * + * @return A string containing the ASCII art of the cow. + */ + @Override + public String getAnimalArt() { + return + "/ \\__\n"+ + "( @\\___\n" + + "/ O\n" + + "/ (_____/\n" + + "/_____/"; + } + + /** + * Returns the name of the animal ("dog"). + * This method overrides the toString method to return the name of the cow. + * + * @return The string "cow" representing the name of the animal. + */ + @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 2266aec5b3b0e598aa3cb41fc21d69dfd4a52304 Mon Sep 17 00:00:00 2001 From: JSaiyan <183049245+JSaiyan@users.noreply.github.com> Date: Tue, 14 Jan 2025 12:19:47 -0800 Subject: [PATCH 6/6] Lion --- src/Lion.java | 35 +++++++++++++++++++++++++++++++++++ src/SayApp.java | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 src/Lion.java diff --git a/src/Lion.java b/src/Lion.java new file mode 100644 index 0000000..238e3c3 --- /dev/null +++ b/src/Lion.java @@ -0,0 +1,35 @@ +/** + * The Lion class represents a Lion and provides its ASCII art representation. + * This class implements the Animal interface and overrides the getAnimalArt + * and toString methods. + * + * Cow by Tony Monroe. See license file for more details. + */ +class Lion implements Animal +{ + + /** + * Returns the ASCII art representation of the Lion. + * + * @return A string containing the ASCII art of the Lion. + */ + @Override + public String getAnimalArt() { + return " ^__^\n" + + " { (oo) }\\_______\n" + + " {(__)}\\ )\\/\\\n" + + " ||----w |\n" + + " || ||"; + } + + /** + * Returns the name of the animal ("Lion"). + * This method overrides the toString method to return the name of the Lion. + * + * @return The string "Lion" representing the name of the animal. + */ + @Override + public String toString() { + return "Lion"; + } +} diff --git a/src/SayApp.java b/src/SayApp.java index 4a33a4b..64e96f9 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(), new Dog()); + return Arrays.asList(new Cow(), new Duck(), new Dog(), new Lion()); } /**