From b662d8e5b7367932aad644b4c6dcf7b616feeae9 Mon Sep 17 00:00:00 2001 From: rcases Date: Thu, 8 Feb 2018 11:25:33 -0800 Subject: [PATCH 1/4] added javadoc for baffle() --- ch04/Exercise.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ch04/Exercise.java b/ch04/Exercise.java index ba8c2a9..fad1462 100644 --- a/ch04/Exercise.java +++ b/ch04/Exercise.java @@ -12,7 +12,10 @@ public static void main(String[] args) { System.out.print("I "); baffle(); } - + /** + * When baffle() is invoked, prints "wug" + * and calls ping() + */ public static void baffle() { System.out.print("wug"); ping(); From 56b3be155a9d896970f38d2099bd8a94733a76c9 Mon Sep 17 00:00:00 2001 From: Roberto Cases <31931337+RBertoCases@users.noreply.github.com> Date: Thu, 8 Feb 2018 11:29:00 -0800 Subject: [PATCH 2/4] Update Exercise.java --- ch04/Exercise.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ch04/Exercise.java b/ch04/Exercise.java index fad1462..22fb3ec 100644 --- a/ch04/Exercise.java +++ b/ch04/Exercise.java @@ -12,6 +12,7 @@ public static void main(String[] args) { System.out.print("I "); baffle(); } + /** * When baffle() is invoked, prints "wug" * and calls ping() @@ -20,7 +21,10 @@ public static void baffle() { System.out.print("wug"); ping(); } - + + /** + * When ping() is invoked, prints "." + */ public static void ping() { System.out.println("."); } From bba95879cf0866c5fc8d2ffbd7132e2f2fc8374a Mon Sep 17 00:00:00 2001 From: rcases Date: Thu, 8 Feb 2018 11:47:18 -0800 Subject: [PATCH 3/4] added javadoc for all methods --- ch04/Exercise.java | 15 +++++++++++++-- ch04/Exercise4.java | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 ch04/Exercise4.java diff --git a/ch04/Exercise.java b/ch04/Exercise.java index 22fb3ec..c217039 100644 --- a/ch04/Exercise.java +++ b/ch04/Exercise.java @@ -1,11 +1,22 @@ public class Exercise { - + + /** + * Calls baffle() + * and then prints "You wugga " + * then calls baffle() again. + */ public static void zoop() { baffle(); System.out.print("You wugga "); baffle(); } - + + /** + * prints "No, I " + * calls zoop() + * prints "I " + * then calls baffle() + */ public static void main(String[] args) { System.out.print("No, I "); zoop(); diff --git a/ch04/Exercise4.java b/ch04/Exercise4.java new file mode 100644 index 0000000..9b26749 --- /dev/null +++ b/ch04/Exercise4.java @@ -0,0 +1,44 @@ +public class Exercise4 { + + /** + * when zoop() invoked, calls baffle() + * and then prints "You Wugga " + * and calls baffle() again. + */ + public static void zoop() { + baffle(); + System.out.print("You wugga "); + baffle(); + } + + /** + * @param args + * prints "No, I " + * calls zoop() + * prints "I " + * then calls baffle() + */ + public static void main(String[] args) { + System.out.print("No, I "); + zoop(); + System.out.print("I "); + baffle(); + } + + /** + * When baffle() is invoked, prints "wug" + * and calls ping() + */ + public static void baffle() { + System.out.print("wug"); + ping(); + } + + /** + * When ping() is invoked, prints "." + */ + public static void ping() { + System.out.println("."); + } + +} From 0d510c6acc842fa80fcc27d376141ece99ac8929 Mon Sep 17 00:00:00 2001 From: rcases Date: Thu, 8 Feb 2018 12:45:48 -0800 Subject: [PATCH 4/4] exercise 4.2 --- ch04/Exercise.java | 19 ++++++++++++++++--- ch04/Exercise4.java | 44 -------------------------------------------- 2 files changed, 16 insertions(+), 47 deletions(-) delete mode 100644 ch04/Exercise4.java diff --git a/ch04/Exercise.java b/ch04/Exercise.java index c217039..7e7234d 100644 --- a/ch04/Exercise.java +++ b/ch04/Exercise.java @@ -1,9 +1,10 @@ public class Exercise { + /** - * Calls baffle() - * and then prints "You wugga " - * then calls baffle() again. + * when zoop() invoked, calls baffle() + * and then prints "You Wugga " + * and calls baffle() again. */ public static void zoop() { baffle(); @@ -12,6 +13,7 @@ public static void zoop() { } /** + * @param args * prints "No, I " * calls zoop() * prints "I " @@ -22,6 +24,7 @@ public static void main(String[] args) { zoop(); System.out.print("I "); baffle(); + zool(11, "Mishu", "Sand Hollow"); } /** @@ -39,5 +42,15 @@ public static void baffle() { public static void ping() { System.out.println("."); } + + /** + * + * @param age + * @param pet + * @param street + */ + public static void zool(int age, String pet, String street) { + System.out.print ("\n" + age + pet + street); + } } diff --git a/ch04/Exercise4.java b/ch04/Exercise4.java deleted file mode 100644 index 9b26749..0000000 --- a/ch04/Exercise4.java +++ /dev/null @@ -1,44 +0,0 @@ -public class Exercise4 { - - /** - * when zoop() invoked, calls baffle() - * and then prints "You Wugga " - * and calls baffle() again. - */ - public static void zoop() { - baffle(); - System.out.print("You wugga "); - baffle(); - } - - /** - * @param args - * prints "No, I " - * calls zoop() - * prints "I " - * then calls baffle() - */ - public static void main(String[] args) { - System.out.print("No, I "); - zoop(); - System.out.print("I "); - baffle(); - } - - /** - * When baffle() is invoked, prints "wug" - * and calls ping() - */ - public static void baffle() { - System.out.print("wug"); - ping(); - } - - /** - * When ping() is invoked, prints "." - */ - public static void ping() { - System.out.println("."); - } - -}