Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cui Minjing] iP #13

Open
wants to merge 59 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
4caa62c
level-0
Cuiminjing Aug 25, 2021
22361f2
Update Duke.java
Cuiminjing Aug 25, 2021
d9444d5
Merge remote-tracking branch 'origin/master'
Cuiminjing Aug 25, 2021
5a95fff
Level-1
Cuiminjing Aug 25, 2021
9082346
Level-1
Cuiminjing Aug 25, 2021
f9d3e52
Level-2
Cuiminjing Aug 25, 2021
035821c
Level-3
Cuiminjing Aug 25, 2021
44ec76d
Level-4
Cuiminjing Aug 31, 2021
b1b1d94
Level-4
Cuiminjing Aug 31, 2021
24b02c7
Level-4
Cuiminjing Aug 31, 2021
e497d25
Level-4 final with ui
Cuiminjing Sep 1, 2021
2222f06
level-4 after peer review
Cuiminjing Sep 5, 2021
633befa
Level-5
Cuiminjing Sep 5, 2021
e7c8ad4
exception
Cuiminjing Sep 5, 2021
c2637d1
package
Cuiminjing Sep 5, 2021
7caaf87
commit
Cuiminjing Sep 6, 2021
5052722
for branch level 5
Cuiminjing Sep 6, 2021
fe3aae2
for master
Cuiminjing Sep 6, 2021
78c0a19
for master
Cuiminjing Sep 6, 2021
8f91ee9
practice
Cuiminjing Sep 6, 2021
c6ae5c3
..
Cuiminjing Sep 6, 2021
2a818e7
level-6
Cuiminjing Sep 12, 2021
548867c
for master
Cuiminjing Sep 12, 2021
dc40ec5
level-7
Cuiminjing Sep 12, 2021
aa415ce
level-9
Cuiminjing Sep 26, 2021
7970bad
Level-9 final
Cuiminjing Sep 26, 2021
b07d5d1
JavaDoc
Cuiminjing Sep 26, 2021
fcf82ba
Update README.md
Cuiminjing Sep 26, 2021
09b6898
Update README.md
Cuiminjing Sep 26, 2021
bf3ba61
Update README.md
Cuiminjing Sep 26, 2021
eb1a1b4
Update README.md
Cuiminjing Sep 26, 2021
912736e
Update README.md
Cuiminjing Sep 26, 2021
b84167c
Update README.md
Cuiminjing Sep 26, 2021
c90176d
no message
Cuiminjing Sep 26, 2021
a06dec1
Merge remote-tracking branch 'origin/master'
Cuiminjing Sep 26, 2021
c039eb1
images
Cuiminjing Sep 26, 2021
1cde7f8
Update README.md
Cuiminjing Sep 26, 2021
3798107
Update README.md
Cuiminjing Sep 26, 2021
1d7f2da
Update README.md
Cuiminjing Sep 26, 2021
2e7fc7d
Update README.md
Cuiminjing Sep 26, 2021
ac11498
Update README.md
Cuiminjing Sep 26, 2021
46bfe80
Update README.md
Cuiminjing Sep 26, 2021
bf17d78
Update README.md
Cuiminjing Sep 26, 2021
4c56f42
Update README.md
Cuiminjing Sep 26, 2021
d0fbb00
Update README.md
Cuiminjing Sep 26, 2021
05d765d
Update README.md
Cuiminjing Sep 26, 2021
338ef72
final
Cuiminjing Sep 30, 2021
59ebc42
add error detecting
Cuiminjing Sep 30, 2021
c521047
Update README.md
Cuiminjing Sep 30, 2021
b5314f1
Update README.md
Cuiminjing Sep 30, 2021
5c06be4
Update README.md
Cuiminjing Sep 30, 2021
7f3abf0
Update README.md
Cuiminjing Sep 30, 2021
82aaf0f
Update README.md
Cuiminjing Sep 30, 2021
10f2a4a
test
Cuiminjing Sep 30, 2021
9080cae
Merge pull request #1 from Cuiminjing/branch-A-JavaDoc
Cuiminjing Sep 30, 2021
12ecb0d
final version of ip
Cuiminjing Sep 30, 2021
4b632a0
Merge branch 'branch-A-JavaDoc'
Cuiminjing Sep 30, 2021
93acc4c
Merge remote-tracking branch 'origin/master'
Cuiminjing Sep 30, 2021
8a4135c
change for ug
Cuiminjing Oct 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Level-4
  • Loading branch information
Cuiminjing committed Aug 31, 2021
commit 24b02c7f38b49768c622c62ee74d615d1853f879
8 changes: 4 additions & 4 deletions src/main/java/Duke.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public static void greeting() {
+ "| |_| | |_| | < __/\n"
+ "|____/ \\__,_|_|\\_\\___|\n";
System.out.println("Hello from\n" + logo);
System.out.println("____________________________________________________________");
System.out.println("Hello! I'm Duke");
System.out.println("What can I do for you?");
System.out.println("____________________________________________________________");
System.out.println(Line);
System.out.println(" Hello! I'm Duke");
System.out.println(" What can I do for you?");
System.out.println(Line);
}
public static void main(String[] args) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation for this method is quite long. Perhaps it could be refactored further? For example, the handling of each task (todo / deadline / event) could be made different methods. You may also consider making the "happy path" more prominent.

greeting();
Expand Down
60 changes: 58 additions & 2 deletions text-ui-test/EXPECTED.TXT
Original file line number Diff line number Diff line change
@@ -1,7 +1,63 @@
Hello from
____ _
| _ \ _ _| | _____
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|

____________________________________________________________
Hello! I'm Duke
What can I do for you?
____________________________________________________________
todo task1
____________________________________________________________
Got it. I've added this task:
[T][ ] task1
Now you have 1 tasks in the list
____________________________________________________________
todo taks2
____________________________________________________________
Got it. I've added this task:
[T][ ] taks2
Now you have 2 tasks in the list
____________________________________________________________

____________________________________________________________
Here are the tasks in your list:
1.[T][ ] task1
2.[T][ ] taks2
____________________________________________________________

____________________________________________________________
Nice! I've marked this task as done:
[T][X] task1
____________________________________________________________

____________________________________________________________
Got it. I've added this task:
[D][ ] task3 (y Sunday)
Now you have 3 tasks in the list
____________________________________________________________

____________________________________________________________
Got it. I've added this task:
[E][ ] task4 (t 2-3pm)
Now you have 4 tasks in the list
____________________________________________________________

____________________________________________________________
Nice! I've marked this task as done:
[E][X] task4 (at: t 2-3pm)
____________________________________________________________

____________________________________________________________
Here are the tasks in your list:
1.[T][X] task1
2.[T][ ] taks2
3.[D][ ] task3 (by: y Sunday)
4.[E][X] task4 (at: t 2-3pm)
____________________________________________________________

____________________________________________________________
Bye. Hope to see you again soon!
____________________________________________________________
9 changes: 9 additions & 0 deletions text-ui-test/input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
todo task1
todo task2
list
done 1
deadline task3 /by Sunday
event task4 /at 2-3pm
done 4
list
bye
2 changes: 1 addition & 1 deletion text-ui-test/runtest.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ REM delete output from previous run
if exist ACTUAL.TXT del ACTUAL.TXT

REM compile the code into the bin folder
javac -cp ..\src\main\java\Duke -Xlint:none -d ..\bin ..\src\main\java\*.java
javac -cp ..\src\main\java -Xlint:none -d ..\bin ..\src\main\java\*.java
IF ERRORLEVEL 1 (
echo ********** BUILD FAILURE **********
exit /b 1
Expand Down