-
Notifications
You must be signed in to change notification settings - Fork 461
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
[Liu Han] ip #500
base: master
Are you sure you want to change the base?
[Liu Han] ip #500
Changes from 8 commits
556af3f
9676077
0d9ef52
5da01cb
0de5e80
3eed790
dac7f8e
880e4c0
2fe064a
a553d00
f5659ce
27413b8
ab182d3
a226e93
dbe31f4
ab2bbb2
d224115
ece43a0
eb63281
0e48f38
e98b02e
474467d
3f2cd52
1f03af6
dd62132
82c1254
fce0fb3
733de7f
aea7a3a
75e8974
f96b9c0
0948713
66c9edc
8a3b775
c8a71d1
4c5a763
82f3c2b
f22bafd
57cac3f
64a62a0
3493580
6a2a08d
068277a
16a3594
719d544
20602c7
4faf015
271d87c
d8c698b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,53 @@ | ||
import java.util.*; | ||
|
||
public class Duke { | ||
|
||
enum Ability { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good use of enums for different commands! |
||
bye, | ||
list, | ||
mark, | ||
unmark, | ||
todo, | ||
delete | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Enum names should be written in PascalCase or all uppercase?
|
||
} | ||
|
||
public static void main(String[] args) { | ||
String logo = " ____ _ \n" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm thinking that maybe variable logo can be set as final? |
||
+ "| _ \\ _ _| | _____ \n" | ||
+ "| | | | | | | |/ / _ \\\n" | ||
+ "| |_| | |_| | < __/\n" | ||
+ "|____/ \\__,_|_|\\_\\___|\n"; | ||
System.out.println("Hello from\n" + logo); | ||
String hello = "____________________________________________________________\n" + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think can leave an empty space here? |
||
" Hello! I'm Duke\n" + | ||
" What can I do for you?\n" + | ||
"____________________________________________________________\n"; | ||
System.out.println(hello); | ||
|
||
List<String> list = new ArrayList<String>(); | ||
|
||
String strlst = "____________________________________________________________\n" + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe you can change this variable to stringList or something like that to make it clearer? |
||
" Here are the tasks in your list:"; | ||
|
||
System.out.println(strlst); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think can remove a blank line here 😃 |
||
|
||
String todolist = "____________________________________________________________\n" + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be |
||
" Got it. I've added this task:"; | ||
System.out.println(todolist); | ||
|
||
String todoEmpty = "____________________________________________________________\n" + | ||
" ☹ OOPS!!! The description of a todo cannot be empty.\n" + | ||
"____________________________________________________________\n"; | ||
System.out.println(todoEmpty); | ||
|
||
String unkown = "____________________________________________________________\n" + | ||
" ☹ OOPS!!! I'm sorry, but I don't know what that means :-(\n" + | ||
"____________________________________________________________\n"; | ||
|
||
System.out.println(unkown); | ||
|
||
// if("delete") | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ then | |
fi | ||
|
||
# compile the code into the bin folder, terminates if error occurred | ||
if ! javac -cp ../src/main/java -Xlint:none -d ../bin ../src/main/java/*.java | ||
if ! javac -cp ../src/main/java -Xlint:none -d ../bin ../src/main/java/Duke.java | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like how you changed the accessibility where it is more specific 😄 |
||
then | ||
echo "********** BUILD FAILURE **********" | ||
exit 1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of classes should be listed explicitly?