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 6 [from Wed Feb 12 noon] - Tutorial

    1 Demo debugging in an IDE

    Suggested pre-tutorial preparations:

    • Clone the https://github.com/nus-cs2113-AY1920S2/personbook repo to your Computer (no need to fork first).
    • Set it up in your IDE.
    • Use the IDE debugging to step through the code to understand how the code works. For example, you can try to find answers to these questions:
      • How to add a new find command to locate persons by name?
      • What's the purpose of the variable PersonBook#lastShownList? Is it really needed?

    During the tutorial, demo your ability to do debugging using an IDE by performing the following tasks:

    1. Set a breakpoint in the following method of the Main class.
      /** Reads the user command and executes it, until the user issues the exit command.  */
      private void runCommandLoopUntilExitCommand() {
      Command command;
      do {
      String userCommandText = ui.getUserCommand();
      command = new Parser().parseCommand(userCommandText);
      CommandResult result = executeCommand(command);
      personBook.setLastShownList(result.getRelevantPersons());
      ui.showResultToUser(result);

      } while (!ExitCommand.isExit(command));
      }
    2. Show how to set a conditional breakpoint so that execution pauses when the user types in the command list.
    3. Use the debugger to step through the code while explaining how the code works. Start from the main method.
    4. Explain your answer to the following question:

      What's the purpose of the variable PersonBook#lastShownList? Is it really needed?

    2 Demo iP using the jar file

    • Copy your iP jar file to an empty folder.
    • Do a quick demo of it to the tutor.

    3 Show your tP UG draft

    • Show to the tutor your UG draft that you uploaded to LumiNUS.