SWE 2410 2nd Exam Prep

You may bring one page of notes (possibly front and back, but only a single sheet of paper) to the exam.

Review

Topics

The exam will focus on material since exam 1, but may include some of the older material.

Review Questions

  1. Explain how you could (usefully) apply the Adapter pattern to the garden simulator lab.
  2. We presented cohesion and coupling as primary measures of modularity for classes/modules/packages/methods. Are there other things that might promote strong modularity in these?
  3. Some engineers argue for a type of coupling based on inheritance. Identify reasons to list this as a different type of coupling and reasons to not.
  4. Are all uses of Java's reflection features (like setAccessible) content coupling?
  5. Why do you suppose the worst type of coupling is called "content" coupling?
  6. What type of cohesion does a program exhibit if it has just one large Main class? Explain.
  7. What is the difference between temporal cohesion and procedural cohesion?
  8. Why do you suppose the highest form of cohesion termed "functional"?
  9. Explain how JavaFX implements MVC. Why might its implementation of MVC be inadequate for large projects?
  10. Name 3 forms of excise found in IntelliJ.
  11. Many websites go to the extreme of having very few choices on their landing page while others have an overwhelming number. Why are both forms of excise?
  12. Name 3 types of excise experienced in the everyday life of students (not involving software).
  13. Explain two uses of the Command pattern besides eliminating the excise of "do you really mean to do that?" messages.
  14. Draw the command pattern as it might be applied to registering for courses in the coming semester.
  15. Identify how the Decorator pattern could be applied to a classroom in a software system, describe that system, and draw a diagram showing the application. Which classes need to be abstract or interfaces?
  16. Give significant differences between the Strategy and Decorator patterns (so that a programmer could decide which to use).
  17. Can you write a Java application that uses threads that is guaranteed to never terminate?
  18. Do threads require multi-core CPUs? Explain.
  19. If a method is synchronized and two threads execute the method at the same time, which goes first? Why?
  20. Explain what Platform.RunAfter does.