From bbfe44c560a1f0802381be52e744225d096182d2 Mon Sep 17 00:00:00 2001 From: John Dennis Date: Sat, 27 Jan 2024 14:24:40 -0800 Subject: [PATCH 1/2] John Dennis --- .idea/misc.xml | 2 +- src/StumpTheChump.java | 7 +++++++ src/date.java | 22 ++++++++++++++++++++++ 3 files changed, 30 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/StumpTheChump.java b/src/StumpTheChump.java index dffc096..586cbb0 100644 --- a/src/StumpTheChump.java +++ b/src/StumpTheChump.java @@ -2,5 +2,12 @@ public class StumpTheChump { // Initially working program. public static void main(String[] args) { System.out.println("Hi Chump, can you be stumped?"); + int hour = 5; + int minute = 55; + System.out.print("the current time is "); + System.out.print(hour); + System.out.print(":"); + System.out.print(minute); + System.out.println("."); } } diff --git a/src/date.java b/src/date.java new file mode 100644 index 0000000..b0e7407 --- /dev/null +++ b/src/date.java @@ -0,0 +1,22 @@ +public class date { + public static void main(String[] args) { + System.out.println("Hello, World!"); + String day = "Thursday"; + int date = 26; + String month = "January"; + int year = 2024; + System.out.print("Today's date it "); + 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(date); + System.out.print("/"); + System.out.print(month); + System.out.print("/"); + System.out.print(year);} +} \ No newline at end of file From f71b97ca8a579b8f2205793acee0bd0f8be6dcb4 Mon Sep 17 00:00:00 2001 From: John Dennis Date: Sat, 27 Jan 2024 14:33:27 -0800 Subject: [PATCH 2/2] John Dennis --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 931badb..d35d43b 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ HINT: CR Computer Science Discord groups are a great way to play this game remot - Opponent gets a point if the error isn't found. **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 created a program to display the current time. However, there were several errors, including not capitalizing System, placing quotation marks around an intiger variable, missing a ;, missing a space, and capitalizing Static. My partner was able to find all of the errors and correct the program. Starting with capitalizing System and not Static as well as adding a missing ;, the program would run, but the output would still be incorrect. After this he was able to see the unneccessary quotation marks and missing space in the output and corrected those errors as well. I did this purposly so that the program would still run, but contain errors, making it more difficult to solve. --- ## Part 2: Date Display Program