This site is from a past semester! The current version will be here when the new semester starts.
CS2113/T 2021 Jan-May
  • Full Timeline
  • Week 1 [Mon, Jan 11th]
  • Week 2 [Mon, Jun 21st]
  • Week 3 [Mon, Jun 28th]
  • Week 4 [Mon, Jul 5th]
  • Week 5 [Mon, Jul 12th]
  • Week 6 [Mon, Jul 19th]
  • Week 7 [Mon, Jul 26th]
  • Week 8 [Mon, Aug 9th]
  • Week 9 [Mon, Aug 16th]
  • Week 10 [Mon, Aug 23rd]
  • Week 11 [Mon, Aug 30th]
  • Week 12 [Mon, Sep 6th]
  • Week 13 [Mon, Sep 13th]
  • Textbook
  • Admin Info
  • Dashboards
  •  Individual Project (iP):
  • Individual Project Info
  • iP Upstream Repo
  • iP Code Dashboard
  • iP Progress Dashboard

  •  Team Project (tP):
  • Team Project Info
  • Reference AB3
  • Team List
  • tP Code Dashboard
  • tP Progress Dashboard
  • Java exercises
  • Report Bugs
  • Forum
  • Gitter (Chat)
  • Instructors
  • Announcements
  • Files (handouts, submissions etc.)
  • Tutorial Schedule
  • Java Coding Standard
  • Git Conventions
  • Forum Activities Dashboard
  • Participation Dashboard
  • iP: Week 2iP: Week 4


    iP: Week 3

    1. Do any leftover iP tasks from the previous week
    2. Add Increments (+ commit, tag, push): Level-1, Level-2, Level-3, A-CodingStandard

    Reminder about the deadline for the weekly project tasks:

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

    1 Do any leftover iP tasks from the previous week

    • Remember to do any leftover increments from the past weeks before starting on the current week's increments. This guideline applies to future weeks too.

    2 Add Increments (+ commit, tag, push): Level-1, Level-2, Level-3, A-CodingStandard

    • Implement the following in this context, an increment is a Duke level or a Duke extensionincrements in the given order.
    • 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)
    Duke Level-1: Greet, Echo, Exit

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

    Duke 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.
    Duke 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.[X] read book
         2.[ ] return book
         3.[ ] buy bread
        ____________________________________________________________
    
    done 2
        ____________________________________________________________
         Nice! I've marked this task as done: 
           [X] 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 ? "X" : " "); // mark done task with X
        }
    
        //...
    }
    
    Task t = new Task("read book");
    t.markAsDone();
    
    Duke A-CodingStandard: Follow the Coding Standard

    A-CodingStandard

         Tweak the code to comply with a coding standard

    Tweak the code to comply with a given coding standard. From this point onward, ensure any new code added are compliant with the given coding standard.


    iP: Week 2iP: Week 4