SWE 2410 2nd Exam Prep

You may bring one page of hand-written 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. Name a pattern that improves coupling but not cohesion, and name a pattern that improves cohesion but not coupling.
  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. Explain a possible reason behind the name of the worst type of coupling, "content coupling". That is, explain the use of "content" in that context.
  6. What type of cohesion does a Java program exhibit if it has just one class, Main? Explain.
  7. What is the difference between temporal cohesion and procedural cohesion?
  8. Why do you suppose the highest form of cohesion is 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 "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 without just falling into an infinite loop?
  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.RunLater does.
  21. How do AWS Lambdas satisfy the "essential characteristics" of cloud computing as identified by NIST?
  22. Why is JSON format often used to transmit data to and from AWS Lambdas?
  23. What are some reasons to not use JSON format to transmit data to and from AWS Lambdas?
  24. Suppose you are developing a new web-based application around AWS Lambdas. It is always bad to introduce too many technologies, so you decide to use Lambdas to implement Step Functions. Explain why this is a bad idea.
  25. Would Pub/Sub be a good cloud pattern to use when an application never needs more than one subscriber? Explain.
  26. When should you use the Singleton Pattern? Why is global access important?