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
  • Week 3 [Jan 27] - Tutorial

    0 [CS2103 students only] Form teams

    • Form teams, under the guidance of the tutor. See the panel below for team forming constrains and other related info.

    1 Register the team before leaving the tutorial

    • Get your team ID from the tutor. Each student must submit your team ID via the LumiNUS Class Groups page -- for us to know which team you joined. Note the team ID follows a specific format.

    2 Introduce yourselves

    • Introduce yourself to the tutor and the members of your team and the partner team (i.e., the other team under your tutor)

    3 Fix a weekly project meeting time

    • If you haven't done so already, set up a weekly project meeting time/venue (and communication channels) with your team members.

    4 Find coding standard violations extra

    • Do the following exercise, if you have time.

    Consider the code given below:

    import java.util.*;

    public class Task {
    public static final String descriptionPrefix = "description: ";
    private String description;
    private boolean important;
    List<String> pastDescription = new ArrayList<>(); // a list of past descriptions

    public Task(String d) {
    this.description = d;
    if (!d.isEmpty())
    this.important = true;
    }

    public String getAsXML() { return "<task>"+description+"</task>"; }

    /**
    * Print the description as a string.
    */
    public void printingDescription(){ System.out.println(this); }

    @Override
    public String toString() { return descriptionPrefix + description; }
    }

    In what ways the code violate the coding standard you are expected to follow?

    Here are three:

    • descriptionPrefix is a constant and should be named DESCRIPTION_PREFIX
    • method name printingDescription() should be named as printDescription()
    • boolean variable important should be named to sound boolean e.g., isImportant

    There are many more.