This site is from a past semester! The current version will be here when the new semester starts.
CS2113/T 2020 Jan-Apr
  • Full Timeline
  • Week 1 [from Mon Jan 13]
  • Week 2 [from Wed Jan 15 noon]
  • Week 3 [from Wed Jan 22 noon]
  • Week 4 [from Wed Jan 29 noon]
  • Week 5 [from Wed Feb 5 noon]
  • Week 6 [from Wed Feb 12 noon]
  • Week 7 [from Wed Feb 19 noon]
  • Week 8 [from Wed Mar 4 noon]
  • Week 9 [from Wed Mar 11 noon]
  • Week 10 [from Wed Mar 18 noon]
  • Week 11 [from Wed Mar 25 noon]
  • Week 12 [from Wed Apr 1 noon]
  • Week 13 [from Wed Apr 8 noon]
  • Textbook
  • Admin Info
  • Report Bugs
  • Forum
  • Instructors
  • Announcements
  • File Submissions
  • Tutorial Schedule
  • repl.it link
  • Java Coding Standard
  • Forum Activities Dashboard
  • Participation Dashboard

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

  •  Team Project (tP):
  • Team Project Info
  • Team List
  • tP Code Dashboard
  • tP Progress Dashboard
  • iP: Week 5 iP: Week 7


    iP: Week 6

    1. Add Increments as parallel branches: Level-6, Level-7
    2. Add Increment: A-Jar

    1 Add Increments as parallel branches: Level-6, Level-7

    • Practice using parallel git branches, as explained below:
      1. First, do Level-6 in a branch named branch-Level-6, but do not merge it.
      2. Then, go back to the master branch and implement Level-7 in a separate branch named branch-Level-7.
      3. Now, go back to the master branch and merge the two branches one after the other.
        If there are merge conflicts, you'll have to resolve them first.
      4. As before, tag the commit (in the master branch, after merging) that achieves the respective deliverable, and push to your fork.
    • As before, Merge without a fast-forward so that git creates a separate commit for the merge.
      Remember to push the branches to your fork so that the bot can detect them.
      Advanced git users: do not delete the branch after merging.
    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.

    Level-7: Save

    Level 7. Save

    Save the tasks in the hard disk automatically whenever the task list changes. Load the data from the hard disk when Duke starts up. You may hard-code the file name and location e.g., [project_root]/data/duke.txt

    The format of the file is up to you. Example:

    T | 1 | read book
    D | 0 | return book | June 6th
    E | 0 | project meeting | Aug 6th 2-4pm
    T | 1 | join sports club

    If you use file paths in your code,

    • remember to use relative paths rather than absolute paths such as C:\data. If not, your app can cause unpredictable results when used in another computer.
    • remember to specify file paths in an OS-independent way. If not, your app might not work when used on a different OS.

    Your code must handle the case where the file doesn't exist at the start. Reason: when someone else takes your Duke and runs it for the first time, the required file might not exist in their computer. Similarly, if you expect the data file to be in as specific folder (e.g., ./data/), you must also handle the 'folder does not exist yet' case.

    2 Add Increment: A-Jar

    • In case this increment does not require any code changes, you may tag the commit at which this was achieved as A-Jar (even if that commit has another tag already).
    • Upload the jar file to your fork as explained in the panel below. You can ignore the point about using Gradle.
    A-Jar: Create a JAR File

    A-Jar

         Package the App as a JAR file

    Package the app as an executable JAR file so that it can be distributed easily.

    You can assume the user will run the jar file in the following way only:

    • Copy the jar file into an empty folder
    • Open a command window in that folder
    • Run the command java -jar {filename}.jar e.g., java -jar Duke.jar (i.e., run the command in the same folder as the jar file)

    Do not commit the JAR file created. Instead, you can make the JAR file available in the following manner.

    • Go to your fork on GitHub and create a new release.
    • In the page where you fill the details of th release,
      • give an appropriate version number e.g., v0.1
      • attach the JAR file where it says Attach binaries by dropping them ....

    If you are using Gradle for your project, refer to the Gradle tutorial at the Duke repo (i.e., the repo you forked from) to find how to create a jar file using Gradle.

    A-Gradle

         Automate project builds using Gradle

    Use Gradle to automate some of the build tasks of the project. Refer to the Gradle tutorial at the Duke repo (i.e., the repo you forked from) to find how to set up Gradle for your project.

    • Minimal: Set up gradle so that you can build and run Duke using gradle.
    • Recommended: Set up gradle to run unit tests.
    • Stretch Goal: Use gradle to automate more things in your project.


    iP: Week 5 iP: Week 7