CPSC 480-010 Software Engineering (SE) Fall 2025

Exercise 44: Team Mock Clock II Posted: Nov 04

If you haven't completed Exercise 42: Team Mock Clock, do so before completing this one. Notes from this are due at the end of class.

After that, answer the following questions. Use a couple of sentences (at least) for each of them.

  1. Explain what it takes to add the same test to each of the branches:
    a. main direct testing
    b. dip Using DIP (Dependency Inversion Principle)
    c. mock Using a mock object
  2. Explain the relationship of the real-time clock to the Session class for each of the following. You may want to review the code and examine the UML Class Diagram in Exercise 42: Team Mock Clock.
    a. main direct testing
    b. dip Using DIP (Dependency Inversion Principle)
    c. mock Using a mock object
  3. For each, indicate which of direct testing (main), dip, and mock is the best answer. There can be multiple answers:
    a. Easiest to add a test in terms of time to implement:
    b. Easiest to understand what is going on:
    c. Time to run the tests:

These questions can be answered after class and are due by 3 pm on Wednesday, Nov 5. Upload a new document with these answers added to your notes for today.