From a12bb58475663a8e8e7ab5eebe77eeafa2ba0b48 Mon Sep 17 00:00:00 2001 From: jli667 Date: Sat, 27 Jan 2024 22:53:37 -0800 Subject: [PATCH] Completed lab 002. --- README.md | 1 + src/Date.java | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/Date.java diff --git a/README.md b/README.md index 931badb..ee56173 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.** +- In my first attempts at trying to stump my partner I was unsuccessful. I started with small changes to the end or start brackets and then changed to deleting or replacing letters in the code. My partner's strategy was entirely based on memorization. He started with memorizing the working program and at the start of each round my partner would do a close reading of program. My partner's strategy worked well until the last few rounds because it was harder to spot the error. To solve a spelling error I think that being familiar with how the code is written would make it easier to spot. --- ## Part 2: Date Display Program diff --git a/src/Date.java b/src/Date.java new file mode 100644 index 0000000..0988a81 --- /dev/null +++ b/src/Date.java @@ -0,0 +1,23 @@ +/** + * + * @author Jenny Li + * @since Version 1.0 + * (1/27/24) + * + */ + +public class Date { + public static void main(String[] args) { + int day; + day = 27; + String date; + date = "Saturday"; + String month; + month = "January"; + int year; + year = 2024; + + //System.out.println(date + "," + month + "," + day + "," + year); + System.out.println(date + "," + day + "," + month + "," + year); + } +} \ No newline at end of file