SE 2811 Midterm Exam Prep

Midterm: closed-book, closed-note; on Canvas

Review

Bring your textbook to the review!

These are sample questions; some may be on the exam, but the exam question is likely to be worded differently and there will be questions on other material as well. Use these to make sure you are familiar with each of the topics, to get practice thinking about the sorts of questions you will see, and to make sure you know the technical terminology.

General approach:

Topics

The exam will cover all of the material since the beginning of the term. Ask if you are not quite sure what material that includes! Some key things to know: This is not a comprehensive list. But these items tend to show up on quizzes and exams, so provide a solid starting point. Do read the textbook(s): they give important context that help you remember key concepts and explanations.

Review Questions

  1. What are advantages of object-oriented designs over non-OO designs (that is, procedural designs: collections of steps)?
  2. What would you tell a student in Data Structures to encourage them to prioritize domain classes in their designs?
  3. Give three or more examples of classes that would appear in the solution space but not the problem space.
  4. What are the goals of the noun (and verb) identification method for systems design?
  5. For every pair of criteria (state, behavior, identity, responsibilities), think of a real-world object or concept that exhibits one but not the other.
  6. Consider a registration system: what would be good responsibilities for
  7. Suppose a design includes a class called Main that captures the main in a program along with other stuff. Explain how this class violates the RIBS criteria in multiple ways.
  8. Explain how a high-level class diagram (covering just domain classes) is useful in system design.
  9. Explain one or more ways in which a high-level sequence diagram can be useful to the design process.
  10. How would you describe the design pattern for a classroom? What would be the features? What would be reasons to not apply this pattern?
  11. Explain how the Null Object pattern shows up in JavaFX and draw a class diagram illustrating it. Discuss any negative consequences for using the Null Object pattern, applying those negatives to JavaFX programming.
  12. What type of pattern is the Null Object pattern, behavioral, creational, or structural?
  13. When should you use the Singleton Pattern? Why is global access important?
  14. The Adapter pattern was initially described as allowing a team to replace one library by another. Give two other reasons to use the pattern.
  15. Explain how you would apply the Adapter pattern to the garden simulator lab.
  16. Give significant differences between the Strategy and Decorator patterns (so that a programmer could decide which to use).
  17. What would be a good reason to use both the Decorator and Singleton patterns on the same class (at the same time)? If you think it's unlikely, explain why.
  18. [See the sample questions slide from the cohesion & coupling notes.]