TIC2002 (2019)
  • Full Timeline
  • Week 1 [Aug 12]
  • Week 2 [Aug 19]
  • Week 3 [Aug 26]
  • Week 4 [Sep 2]
  • Week 5 [Sep 9]
  • Week 6 [Sep 16]
  • Week 7 [Sep 30]
  • Week 8 [Oct 7]
  • Week 9 [Oct 14]
  • Week 10 [Oct 21]
  • Week 11 [Oct 28]
  • Week 12 [Nov 4]
  • Week 13 [Nov 11]
  • Textbook
  • Admin Info
  • Report Bugs
  • Forum
  • Announcements
  • File Submissions
  • repl.it link
  • Java Coding Standard
  • Duke repo
  • Week 4 [Sep 2] - Tasks

    1. Submit weekly exercises
    2. Create a Pull Request during/after the lecture
    3. Implement project increments Level-3, A-TextUiTesting optional

    1 Submit weekly exercises

    • As usual.

    2 Create a Pull Request during/after the lecture

    • After pushing some code to your fork, create a pull request (PR) from your fork to https://github.com/nus-tic2002-2019/duke

    • After creating the Pull Request (PR), go to its description (it contains a list of items similar to the below) and tick the items you have completed already.

    • Level-1
    • Level-2
    • Level-3
    • Level-4
      ...

    3 Implement project increments Level-3, A-TextUiTesting optional

    • As before, implement increments, commit at regular intervals, and push to your fork. Your PR will update automatically to reflect the new commits.
    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 as collections classes (e.g., ArrayList) have methods to easily delete an item at a specified location:

    A-Classes

         Use a class to represent tasks

    While it is possible to represent a task list as a multi-dimensional array containing 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()
    
    A-TextUiTesting: Text UI Testing optional

    A-TextUiTesting

         Test using the I/O redirection technique

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

    A tutorial is provided in the duke repository.

    • After pushing the code to your fork, go to your PR and tick the corresponding items.
      • You should self-report your progress in this manner in future weeks too.
      • Optional items are not in the list.
    • Level-1
    • Level-2
    • Level-3
    • Level-4
      ...