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
  • Week 10 [from Wed Mar 18 noon] - Tutorial

    Guidance for the item(s) below:

    We are moving tutorials to fully-online mode from this week.

    • Tutorial submissions will be counted for weekly participation, as an additional incentive to do tutorial activities. A submission deemed by the instructors as a reasonable attempt (irrespective of the correctness) will be eligible to be counted for participation.
    • Submission deadline: 11.59am of the following Wednesday (same as quizzes).
    • If you encounter problems while doing tutorial tasks,
      • you can post in the forum as usual.
      • you can also ask in our Gitter chat. We chose Gitter because you can login to Gitter using your GitHub account.
        <span class="badge badge-pill badge-warning"></span> Use Gitter for questions that can be answered immediately. For things that might need a longer discussion period (e.g., technical issues), post in the forum instead.
    • We recommend that you do the tutorial activity during your actual tutorial time as both the forum and the Gitter channel will be closely watched by your tutor during that period (i.e., you'll get faster responses). But it is not a hard rule; it is fine as long as you finish the activities by the deadline.
    • You are welcome (even encouraged) to discuss activities/answers with others, but the answers you submit must be your own.
    • Use the file A________-Tutorial-10.docx as the template for your submission. Do follow the submission instructions in that file closely or else our scripts will not be able to detect your submission.
      Upload your submission to the matching folder on LumiNUS.

    1 Smoke-test CATcher

    Guidance for the item(s) below:

    • This activity is compulsory. Please do it before the deadline. Submission to LumiNUS not required as we'll using a script to check compliance.

    Some background: As you know, our i.e., Practical ExamPE includes peer-testing tP products under exam conditions. In the past, we used GitHub as the platform for that -- which was not optimal (e.g., it was hard to ensure the compulsory labels have been applied). As a remedy, some ex-students have been developing an app called CAT stands for Crowd-sourced Anonymous TestingCATcher that we would like to use for the PE this semester.

    In this tutorial, we would like to smoke-test the CATcher app to ensure it can run in your computer.

    1. Download the latest version of the CATcher executable from https://github.com/CATcher-org/CATcher/releases.
    2. Launch the app. Allow the app to run if there are security warnings (e.g., for Win 10, click the More Info link in the security warning and choose Run anyway).
      If the app is blocked by your virus scanner, put it in a new folder and add the folder to the exclusions list of the virus scanner.
      If you encounter other problems at the app launch, refer to the Notes on using the CATcher Desktop App.
    3. Login: Choose the session CS2113/T Alpha Test, and submit.
    4. In the next screen, submit your GitHub credentials directly or choose to the Use GitHub login interface to login to CATcher using your GitHub account.
      If the app asks for public repo access permissions, grant it (just go with the default settings).
    5. Let CATcher create a repo named alpha in your GitHub account, when it asks for permission. That repo will be used to hold the bug reports you will create in this testing session.
    6. Use the app to create 1-2 dummy bug reports, similar to how you would enter bug reports in the GitHub issue tracker. Include at least one screenshot in one of those bug reports.
      you can copy-paste screenshots into the bug description.
      You can use Markdown syntax in the bug descriptions.
      The severity and type labels are compulsory.
    7. Report any problems you encounter at the CATcher issue tracker.
    8. Do NOT delete the alpha repo created by CATcher in your GitHub account (keep it until the end of the semester) as our scripts will look for it later to check if you have done this activity.

    Being able to run CATcher is important for the PE -- if you are unable to run it, please follow up via the CATcher issue tracker until you resolve the issue ASAP.

    2 Demo test coverage

    Guidance for the item(s) below:

    • Measure test coverage in your own IDE. Take a screenshot showing test coverage details such as lines covered, lines not covered, percentage of coverage for different files etc. Include that screenshot in your submission. An example is given below:

    • Demo how you measure test coverage of the tP, in your own IDE.

    3 Exercise: interpret a sequence diagram

    Guidance for the item(s) below:

    • Include your answer to the following question in the submission file.

    Explain the interactions depicted in this sequence diagram.

    First, the createParser() method of an existing ParserFactory object is called. Then, ...

    4 Exercise: draw a sequence diagram

    Guidance for the item(s) below:

    • Hand-draw on paper your answer to the following question (reason: to practice answering similar questions in the exam), take a photo (or scan it), and include that image in your submission.
      <span class="badge badge-pill badge-warning"></span> There are mobile apps (example) that can take a photo of a document and and convert it to a high-quality scan.
      <span class="badge badge-pill badge-warning"></span> We have provided a video of drawing a sequence diagram to match code. Also look at the hint provided at the end of the question.

    Draw a sequence diagram to represent this code snippet.

    if (isFirstPage) {
    new Quote().print();
    }

    The Quote class:

    class Quote{

    String q;

    Quote(){
    q = generate();
    }

    String generate(){
    // ...
    }

    void print(){
    System.out.println(q);
    }

    }
    • Show new Quote().print(); as two method calls.
    • As the created Quote object is not assigned to a variable, it can be considered as 'deleted' soon after its print() method is called.