This site is from a past semester! The current version will be here when the new semester starts.
CS2103/T 2020 Jan-Apr
  • Full Timeline
  • Week 1 [Jan 13]
  • Week 2 [Jan 20]
  • Week 3 [Jan 27]
  • Week 4 [Feb 3]
  • Week 5 [Feb 10]
  • Week 6 [Feb 17]
  • Week 7 [Mar 2]
  • Week 8 [Mar 9]
  • Week 9 [Mar 16]
  • Week 10 [Mar 23]
  • Week 11 [Mar 30]
  • Week 12 [Apr 6]
  • Week 13 [Apr 13]
  • Textbook
  • Admin Info
  • Report Bugs
  • Forum
  • Instructors
  • Announcements
  • File Submissions
  • Tutorial Schedule
  • Java Coding Standard
  • Participation Marks List

  •  Individual Project (iP):
  • Individual Project Info
  • Duke Upstream Repo
  • iP Code Dashboard
  • iP Showcase

  •  Team Project (tP):
  • Team Project Info
  • Team IDs
  • Addressbook-level3
  • Addressbook-level 1,2,4
  • tP Code Dashboard
  • tP Showcase
  • iP (Individual Project): Overview iP: Week 3


    iP: Week 2

    1. Learn about the project
    2. Set up prerequisites
    3. Set up the project in your computer
    4. Add Increments while committing frequently: Level-1, Level-2, Level-3, Level-4, A-TextUiTesting, Level-5, Level-6, A-Enums by Thursday 2359

    The 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.

    1 Learn about the project

    • Read the following two sections, if you haven't done so already:

    2 Set up prerequisites

    • Ensure you have followed the Preparation sections of the following module tools:

    3 Set up the project in your computer

    1. Fork https://github.com/nus-cs2103-AY1920S2/duke.
    2. Enable the issue tracker of your fork (Go to Settings of your fork, scroll to the Features section, and tick the Issues checkbox). Reason: our bots will be posting your weekly progress reports on the issue tracker of your fork.
      If the issue tracker is enabled, you should be able to visit the following URL https://github.com/{your_user_name}/duke/issues e.g., https://github.com/johnDoe/duke/issues
    3. Clone the fork onto your computer.
    4. Set up the project in your IDE as explained in the README file.
      If you are somewhat familiar with build tools such as Gradle, you are free to go ahead and start using Gradle from the beginning by following the Gradle tutorial.

    4 Add Increments while committing frequently: Level-1, Level-2, Level-3, Level-4, A-TextUiTesting, Level-5, Level-6, A-Enums by Thursday 2359

    • Implement the following in this context, an increment is a Duke level or a Duke extensionincrements in the given order.
    • From this point onward, commit code at important points. Minimally, commit after completing each increment.
    • From this point onward, after completing each increment,
      • 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

    Level 1. Greet, Echo, Exit

    In this initial skeletal version of Duke, it 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!
    ____________________________________________________________

    • The indentation and horizontal lines are optional.

    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

    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!
    ____________________________________________________________

    • There is no need to save the data to the hard disk.
    • Assume there will be no more than 100 tasks. If you wish, you may use a fixed size array (e.g., String[100]) to store the items.
    Level-3: Mark as Done

    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:

    A-Classes

         Use a class to represent tasks

    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.

    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

    Level 4. ToDos, Events, Deadlines

    Add support for tracking three types of tasks:

    1. ToDos: tasks without any date/time attached to it e.g., visit new theme park
    2. Deadlines: tasks that need to be done before a specific date/time e.g., submit report by 11/10/2019 5pm
    3. Events: tasks that start at a specific time and ends at a specific time e.g., team project meeting on 2/10/2019 2-4pm

    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:

    A-Inheritance

         Use Inheritance to support multiple task types

    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].

    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

    A-TextUiTesting

         Test using the I/O redirection technique

    Use the input/output redirection technique to semi-automate the testing of Duke.

    A tutorial is provided in the duke repository.

    Level-5: Handle Errors

    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:

    A-Exceptions

         Use Exceptions to handle errors

    Use exceptions to handle errors. For example, define a class DukeException to represent exceptions specific to Duke.

    • Minimal: handle at least the two types of errors shown in the example above.
    • Stretch goal: handle all possible errors in the current version. As you evolve Duke, continue to handle errors related to the new features added.
    Level-6: Delete

    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.
    ____________________________________________________________

    When implementing this feature, you are also recommended to implement the following extension:

    A-Collections

         Use Java Collections classes

    Use Java Collections classes for storing data. For example, you can use an ArrayList<Task> to store the tasks.

    A-Enums: Use Enums if-applicable

    A-Enums

         Use Enumerations

    Use Java enums, if applicable.


    iP (Individual Project): Overview iP: Week 3