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 10 [Oct 21]

    Questions to discuss during tutorial: Divide these questions among team members. Be prepared to answer questions allocated to you.

    Q1

    1. What is Liskov Substitution Principle?
      Give an example from the project where LSP is followed and explain how to change the code to break LSP.
    2. Explain how Law of Demeter affects coupling
      a. Add a line to this code that violates LoD
      void foo(P p){
          //...
      }
      
    3. Give an example in the project code that violates the Law of Demeter.

    Q2

    1. Explain and justify: testing should be efficient and effective
    2. Explain how exploratory and scripted testing is used in your project
    3. Give an example of a negative test case in your project
    4. Explain grey-box test case design

    Q3

    1. Explain: Equivalence Partition improve E&E of testing
    2. What are the EPs for the parameter day of this method
      /**
       * Returns true if the three values represent a valid day
       */
      boolean isValidDay(int year, int month, int day){
      
      } 
      

    Q4

    1. Explain: Boundary Value Analysis improves E&E of testing
    2. What are the boundary values for the parameter day in the question above?
    3. How can EP and BVA heuristics be used in your project?
    4. How do you ensure some clean up code is run after each JUnit test case?

    Q5

    1. What is test coverage? What are different types of coverages?
    2. How to measure coverage in Intellij?
    3. What’s the difference between validation and verification?
      Acceptance tests are validation tests or verification tests?
    4. Give an example of static analysis being used in Intellij