From ce2e49a9228b671c04afecaccfe5cf8e34534827 Mon Sep 17 00:00:00 2001 From: Eliot Rodriguez Date: Tue, 23 Jan 2024 19:47:54 -0800 Subject: [PATCH 1/4] Java Lab 002 complete --- .idea/misc.xml | 2 +- src/Date.java | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/Date.java diff --git a/.idea/misc.xml b/.idea/misc.xml index cf9abe6..cbbff6a 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/src/Date.java b/src/Date.java new file mode 100644 index 0000000..fd61882 --- /dev/null +++ b/src/Date.java @@ -0,0 +1,25 @@ +public class Date { + static String day = "Tuesday"; + static String month = "January"; + static int date = 23; + static int year = 2024; + + public static void main(String[] args) { + System.out.print(day); + System.out.print(", "); + System.out.print(month); + System.out.print(" "); + System.out.print(date); + System.out.print(", "); + System.out.print(year); + System.out.println(); + System.out.print(day); + System.out.print(", "); + System.out.print(date); + System.out.print(" "); + System.out.print(month); + System.out.print(", "); + System.out.print(year); + } + +} From 815f25c9f857800fc77b2209ddc4d99ad4007b17 Mon Sep 17 00:00:00 2001 From: Eliot Rodriguez Date: Tue, 23 Jan 2024 20:38:14 -0800 Subject: [PATCH 2/4] Java Lab 002 complete --- src/Date.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Date.java b/src/Date.java index fd61882..a8a6737 100644 --- a/src/Date.java +++ b/src/Date.java @@ -1,3 +1,12 @@ +/** + * + * @author Trevor Hartman + * @author Eliot Rodriguez + * + * @since version 1.0 + * January 17, 2024 + * + */ public class Date { static String day = "Tuesday"; static String month = "January"; From 8d475e18b3a6de95b4f62f0df3f6a7f60f9bbb2c Mon Sep 17 00:00:00 2001 From: Eliot Rodriguez Date: Tue, 23 Jan 2024 20:39:38 -0800 Subject: [PATCH 3/4] Java Lab 002 complete --- src/Date.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Date.java b/src/Date.java index a8a6737..fbcad94 100644 --- a/src/Date.java +++ b/src/Date.java @@ -4,7 +4,7 @@ * @author Eliot Rodriguez * * @since version 1.0 - * January 17, 2024 + * January 23, 2024 * */ public class Date { From 30063ac9a9a42c0ec4e44c3973a7d6b7552b3582 Mon Sep 17 00:00:00 2001 From: Eliot Rodriguez Date: Thu, 25 Jan 2024 19:20:12 -0800 Subject: [PATCH 4/4] Java Lab 002 complete --- README.md | 1 + src/StumpTheChump.java | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 931badb..8d9aec2 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ HINT: CR Computer Science Discord groups are a great way to play this game remot **After 5 rounds, modify this README.md with a paragraph describing your attempt to stump your partner and the steps your partner took to identify and correct the error or the steps you think they should have used if they didn't solve the problem.** +- I posted my StumptheChump challenge onto the class forum. The errors I intentionally put in were "in" instead of "out", a decimal instead of an integer for the first variable commandnd, no ";" in one of the variable commands, "Int" instead of "int", and system instead of System. --- ## Part 2: Date Display Program diff --git a/src/StumpTheChump.java b/src/StumpTheChump.java index dffc096..c83f272 100644 --- a/src/StumpTheChump.java +++ b/src/StumpTheChump.java @@ -1,6 +1,11 @@ public class StumpTheChump { - // Initially working program. public static void main(String[] args) { - System.out.println("Hi Chump, can you be stumped?"); + System.in.println("Hi Chump, can you be stumped?"); + int x = 35.0; + int y = 15 + Int z = x+y; + system.out.println(z); + } + }