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/README.md b/README.md index 931badb..d89d747 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ 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.** +**For the stump the chump game I attempted to stump my partner by purposefully forgetting to add a couple of semicolons when ending a line of code, I didn't write the correct code to print an output and I similarly created an output and added the period (.) on the next line; and I also included a mathematical error which would mean added an extra zero to create the correct calculated output. I don't know the class Discord so I posted it on the Student Lounge discussion. I unfortunately did not receive replies, but I did respond to a classmate who left me a little stumped on the output that he wanted to print. However, I did recognize some common errors and was able to identify those.** + --- ## Part 2: Date Display Program diff --git a/src/Date.java b/src/Date.java new file mode 100644 index 0000000..3eecf1c --- /dev/null +++ b/src/Date.java @@ -0,0 +1,17 @@ +public class Date { + public static void main(String[] args) { + String day, month; + month="January"; + day= "Saturday"; + int date, year; + date=27; + year=2024; + System.out.println(day); + System.out.println(date); + System.out.println(month); + System.out.println(year); + System.out.println(day+','+month+" "+date+','+year); // American Format + System.out.println(day+','+date+" "+month+" "+year); // European Format + + } +} diff --git a/src/StumpTheChump.java b/src/StumpTheChump.java index dffc096..79d704a 100644 --- a/src/StumpTheChump.java +++ b/src/StumpTheChump.java @@ -1,6 +1,12 @@ public class StumpTheChump { // Initially working program. public static void main(String[] args) { - System.out.println("Hi Chump, can you be stumped?"); + double hour, minute, seconds; + hour=1; + minute= 4; + seconds= 15; + System.out.print("Number of seconds since Midnight "); + System.out.println((hour*3600)+(minute*60)+seconds); + System.out.println('.'); } }