repl.it
linkrepl.it
link (duplicated)iP:
Level-1
, Level-2
, Level-3
, A-CodingStandard
tP:
Reminder about the deadline for the weekly project tasks:
Admin Weekly schedule → Deadline for weekly tasks
The deadline to complete tasks allocated to the week is the e.g., if your tutorial is on Thursday, the deadline is Wednesday 23.59midnight before your tutorial day, unless stated otherwise. Our grading scripts that detect your work run at midnight and only the work that's done by midnight will be eligible for marks (for cases where the task is graded).
Level-1
, Level-2
, Level-3
, A-CodingStandard
git tag
the commit with the exact increment ID e.g., Level-2
, A-TextUiTesting
git push
the code to your fork ( git doesn't push tags unless you specifically ask it to)Level-1
: Greet, Echo, Exit Implement a skeletal version of Duke that starts by greeting the user, simply echos commands entered by the user, and exits when the user types bye
.
Example:
____________________________________________________________
Hello! I'm Duke
What can I do for you?
____________________________________________________________
list
____________________________________________________________
list
____________________________________________________________
blah
____________________________________________________________
blah
____________________________________________________________
bye
____________________________________________________________
Bye. Hope to see you again soon!
____________________________________________________________
You are strongly encouraged to customize the chatbot name, command/display formats, and even the personality of the chatbot to make your chatbot unique.
Level-2
: Add, List Add the ability to store whatever text entered by the user and display them back to the user when requested.
Example:
____________________________________________________________
Hello! I'm Duke
What can I do for you?
____________________________________________________________
read book
____________________________________________________________
added: read book
____________________________________________________________
return book
____________________________________________________________
added: return book
____________________________________________________________
list
____________________________________________________________
1. read book
2. return book
____________________________________________________________
bye
____________________________________________________________
Bye. Hope to see you again soon!
____________________________________________________________
String[100]
) to store the items.Level-3
: Mark as Done Add the ability to mark tasks as done.
list
____________________________________________________________
Here are the tasks in your list:
1.[✓] read book
2.[✗] return book
3.[✗] buy bread
____________________________________________________________
done 2
____________________________________________________________
Nice! I've marked this task as done:
[✓] return book
____________________________________________________________
When implementing this feature, you are also recommended to implement the following extension:
Extension: A-Classes
While it is possible to represent a task list as a multi-dimensional array containing String
, int
, boolean
etc.primitive values, the more natural approach is to use a Task
class to represent tasks.
Partial solution
public class Task {
protected String description;
protected boolean isDone;
public Task(String description) {
this.description = description;
this.isDone = false;
}
public String getStatusIcon() {
return (isDone ? "\u2713" : "\u2718"); //return tick or X symbols
}
//...
}
Task t = new Taks("read book");
t.markAsDone()
Admin Teams → Communication
Use English for all team communications, both spoken and written.
We recommend at least one 1-2 hour synchronous online project meeting per week, in addition to any asynchronous communicating. Reason: Having all members available at the same time will facilitate easier collaboration and more peer-learning.