This site is from a past semester! The current version is here.
CS2113/T Aug '19
  • 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
  • Slack
  • Forum
  • Project Info
  • Instructors
  • Announcements
  • File Submissions
  • Tutorial Schedule
  • Duke
  • Project Phase1 Dashboard
  • Java Coding Standard
  • samplerepo-things
  • Projects List
  • config.json templates for Reposense
  • PersonalAssistant-Duke
  • Project Phase2 Dashboard
  • Reference project - Addressbook
  • Repl.it classroom
  • Previous WeekNext Week

    Week 9 [Oct 14]

    Questions to discuss during tutorial:

    1. What is abstraction? How is it used in the project?
    2. What is coupling?
      1. Foo depends on Bar if …?
      2. Give examples of different ways how a class Foo can be coupled to Bar
    3. What is cohesion?
    4. How does cohesion relates to coupling?
    1. What is the Principle of SoC?
    2. How does SoC relate to coupling and cohesion?
    3. What is SRP?
    4. How does SRP relate to SoC?
    1. What is OCP?
    2. Explain several different ways of achieving OCP
    3. Does the project follow OCP? E.g. Can we add a new command or a new storage type without modifying existing code too much?
    1. What is unit/integration/system/acceptance testing?
    2. What’s the difference between unit testing and integration testing?
    3. What’s the difference between system testing and acceptance testing?
    4. Which integration approach is used in your project?

    Suggested tutorial activity

    Explain the associations, navigabilities, and multiplicities in the class diagram below:

    Suppose we wrote a program to follow the class structure given in this class diagram:

    Draw object diagrams to represent the object structures after each of these steps below. Assume that we are trying to minimize the number of total objects.

    i.e. apply step 1 → [diagram 1] → apply step 2 on diagram 1 → [diagram 2] and so on.

    1. There are no persons.

    2. Alfred is the Guardian of Bruce.

    3. Bruce's contact number is the same as Alfred's.

    4. Alfred is also the guardian of another person. That person lists Alfreds home address as his home address as well as office address.

    5. Alfred has a an office address at Wayne Industries building which is different from his home address (i.e. Bat Cave).

    After step 2, the diagram should be like this: