iP:
Level-1
, Level-2
, Level-3
, Level-4
, A-TextUiTesting
, Level-5
, Level-6
, A-Enums
Thu, Aug 20th 2359The iP (and the tP) undergoes changes after each semester. As such, teething issues are a possibility. If you encounter any problem while doing the iP/tP, please post in the forum so that we can take necessary actions.
We discourage you from doing project tasks allocated to future weeks. Reasons: In order to help you gain the ability to apply knowledge or do tasks effortlessly as if you have been doing them for a long timefluency (and also to better simulate real projects), we want the project work to be done at multiple times with time gaps in betweenspaced and spread over a longer period, rather than to be done as a short burst.
Reminder: as per iP grading criteria, some increments need to to be done in each week for you to get full marks.
Please follow instructions carefully. Any deviations can cause our grading scripts to miss your work (and result in you not getting credit for the work).
Deadline:
Note the typical deadline 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).
But as there are no tutorials this week, you have until Thu, Aug 20th 2359 to finish this week's iP tasks.
Admin iP - Overview
The objectives of the individual project (iP) is to learn/refresh the basics of,
All skills you will learn in the iP will be useful in the team project (tP). Furthermore, some of the iP code can be adapted for the tP.
The more you do in the iP and farther you push beyond the minimal expectations, the easier it will be in your tP.
The iP is based on the generic project called Project Duke, the overview of which is given below.
Duke, the Java Mascot
[credit: Wikipedia]
Project Duke is a educational software project designed to take you through the steps of building a small software incrementally, while applying as many Java and SE techniques as possible along the way.
The project aims to build a product named Duke, a Personal Assistant Chatbot that helps a person to keep track of various things. The name Duke was chosen as a placeholder name, in honor of Duke, the Java Mascot. You may give it any other name and personality you wish.
Here is a sample interaction with Duke:
____________________________________________________________
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|
Hello! I'm Duke
What can I do for you?
____________________________________________________________
list
____________________________________________________________
Here are the tasks in your list:
1.[T][✓] read book
2.[D][✗] return book (by: June 6th)
3.[E][✗] project meeting (at: Aug 6th 2-4pm)
4.[T][✓] join sports club
____________________________________________________________
todo borrow book
____________________________________________________________
Got it. I've added this task:
[T][✗] borrow book
Now you have 5 tasks in the list.
____________________________________________________________
deadline return book /by Sunday
____________________________________________________________
Got it. I've added this task:
[D][✗] return book (by: Sunday)
Now you have 6 tasks in the list.
____________________________________________________________
done 2
____________________________________________________________
Nice! I've marked this task as done:
[D][✓] return book (by: June 6th)
____________________________________________________________
blah
____________________________________________________________
☹ OOPS!!! I'm sorry, but I don't know what that means :-(
____________________________________________________________
bye
____________________________________________________________
Bye. Hope to see you again soon!
____________________________________________________________
The project consists of the following increments:
Level 1
to Level 10
to indicate how each makes the product progressively "level up".The iP is to be done over the first half of the semester.
Admin iP - Grading
Total: 20
marks
Implementation [10
marks]: Requirements to get full marks:
minimal
version of it, simply reaching that minimal version of the requirement is enough for it to be counted for grading -- however, we recommend you to go beyond the minimal; the farther you go, the more practice you will get.Project Management [5
marks]: To get full marks, you should achieve,
Documentation [5
marks]: To get full marks, you should achieve,
You can monitor your iP progress (as detected by our scripts) in the iP Progress Dashboard page.
Admin Programming Language
The main language used in this module is Java. You should use Java for all programming activities, the project, and exam answers. The module doesn’t “teach” Java. We assume you already know Java basics. We expect you to learn on your own any Java constructs not covered in your previous modules. The exam expects you to know Java to the extent that you should be familiar with it as a result of using it in the module exercises/projects. |
Preparation:
We require you to use Java 11 (the Oracle version or the OpenJDK version) for all module work. It is your duty to ensure the code you write (and executables you produce) are compatible with that version of Java. Any incompatibilities will be considered as bugs.
Admin Tools → Git
You are required to use Git. Other revision control software are not allowed. The recommended GUI client for Git is SourceTree, but you may use any other, or none.
Preparation:
Install Git and a Git GUI client on your computer.
SourceTree comes bundled with Git i.e., if you install SourceTree, you get both Git and a GUI client in one shot. If you are already comfortable using Git command line, you need not install/use a GUI client.
Set Git user.name
: We use various tools to analyze your code. For us to be able to identify your commits, we encourage you to set your Git user.name
in all computers you use to a sensible string that uniquely identifies you. For example, you can set it to your GitHub username or your full name. If this user name is not set properly or if you use multiple usernames for Git, our grading scripts might miss some of your work.
After installing Git in a computer, you can set the Git username as follows:
git config --global user.name YOUR_GITHUB_USERNAME
(omit the --global
flag to limit the setting to the current repo only)git config --global user.name JohnDoe
More info about setting Git username is here.
Admin Tools → GitHub
You are required to use GitHub as the hosting and collaboration platform of your project (i.e., to hold the Code repository, Issue Tracker, etc.).
Preparation:
Create a GitHub account (if you don't have one yet), as explained in the panel below.
Admin Appendix E - GitHub: Creating an Account
Create a personal GitHub account if you don't have one yet.
You are advised to choose a sensible GitHub username as you are likely to use it for years to come in professional contexts e.g., in job applications.
Strongly recommended: Complete your GitHub profile. In particular,
Why am I being encouraged to complete my GitHub profile?
The GitHub profile is useful for the tutors and classmates to identify you. If you are reluctant to share your info in your long-term GitHub account, you can remove those details after the module is over or create a separate GitHub account just for the module.
You are discouraged from changing your GitHub username during the semester/exam/grading period as it can cause our auto-grading scripts to miss your GitHub activities. If you do change your GitHub username during that period, please let us know immediately.
The purpose of the profile photo is for the reader to identify you. Therefore, choose a recent individual photo showing your face clearly (i.e., not too small) -- somewhat similar to a passport photo. Given below are some examples of good and bad profile photos.
If you are uncomfortable posting your photo due to security reasons, you can post a lower resolution image so that it is hard for someone to misuse that image for fraudulent purposes. If you are concerned about privacy, you may use a placeholder image in place of the photo in module-related documents that are publicly visible.
More info: See Appendix E - Using GitHub.
Admin Tools → Intellij IDEA
You are recommended to use Intellij IDEA for module-related programming work. While the use of Intellij is not compulsory, note that module materials are optimized for Intellij. Use other IDEs at your own risk.
Preparation:
Settings
of your fork, scroll to the Features
section, and tick the Issues
checkbox). Reason: at times we post feedback on your issue tracker.https://github.com/{your_user_name}/ip/issues
e.g., https://github.com/johnDoe/ip/issues
Level-1
, Level-2
, Level-3
, Level-4
, A-TextUiTesting
, Level-5
, Level-6
, A-Enums
Thu, Aug 20th 2359git 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()
Level-4
: ToDo, Event, Deadline Add support for tracking three types of tasks:
Example:
todo borrow book
____________________________________________________________
Got it. I've added this task:
[T][✗] borrow book
Now you have 5 tasks in the list.
____________________________________________________________
list
____________________________________________________________
Here are the tasks in your list:
1.[T][✓] read book
2.[D][✗] return book (by: June 6th)
3.[E][✗] project meeting (at: Aug 6th 2-4pm)
4.[T][✓] join sports club
5.[T][✗] borrow book
____________________________________________________________
deadline return book /by Sunday
____________________________________________________________
Got it. I've added this task:
[D][✗] return book (by: Sunday)
Now you have 6 tasks in the list.
____________________________________________________________
event project meeting /at Mon 2-4pm
____________________________________________________________
Got it. I've added this task:
[E][✗] project meeting (at: Mon 2-4pm)
Now you have 7 tasks in the list.
____________________________________________________________
At this point, dates/times can be treated as strings; there is no need to convert them to actual dates/times.
Example:
deadline do homework /by no idea :-p
____________________________________________________________
Got it. I've added this task:
[D][✗] do homework (by: no idea :-p)
Now you have 6 tasks in the list.
____________________________________________________________
When implementing this feature, you are also recommended to implement the following extension:
Extension: A-Inheritance
As there are multiple types of tasks that have some similarity between them, you can implement classes Todo
, Deadline
and Event
classes to inherit from a Task
class.
Furthermore, use polymorphism to store all tasks in a data structure containing Task
objects e.g., Task[100]
.
Partial solution
public class Deadline extends Task {
protected String by;
public Deadline(String description, String by) {
super(description);
this.by = by;
}
@Override
public String toString() {
return "[D]" + super.toString() + " (by: " + by + ")";
}
}
Task[] tasks = new Task[100];
task[0] = new Deadline("return book", "Monday");
A-TextUiTesting
: Automated Text UI Testing Use the input/output redirection technique to semi-automate the testing of Duke.
Notes:
text-ui-test
folder).Level-5
: Handle Errors Teach Duke to deal with errors such as incorrect inputs entered by the user.
Example:
todo
____________________________________________________________
☹ OOPS!!! The description of a todo cannot be empty.
____________________________________________________________
blah
____________________________________________________________
☹ OOPS!!! I'm sorry, but I don't know what that means :-(
____________________________________________________________
When implementing this feature, you are also recommended to implement the following extension:
Level-6
: Delete Add support for deleting tasks from the list.
Example:
list
____________________________________________________________
Here are the tasks in your list:
1.[T][✓] read book
2.[D][✓] return book (by: June 6th)
3.[E][✗] project meeting (at: Aug 6th 2-4pm)
4.[T][✓] join sports club
5.[T][✗] borrow book
____________________________________________________________
delete 3
____________________________________________________________
Noted. I've removed this task:
[E][✗] project meeting (at: Aug 6th 2-4pm)
Now you have 4 tasks in the list.
____________________________________________________________