Computer Science - Design Patterns - Lesson

Partner Exercise: Design Patterns Questions

Because it’s impossible to code a design pattern on its own, for this exercise, we’ll focus on the following discussion questions to explore the concepts of design patterns in more depth.

Instructions:

  1. Find a partner.
  2. Spend 20 minutes discussing the following questions.

Discussion Questions:

  1. What is an abstract class?

    • Provide an example of an abstract class and several subclasses that might inherit from it.
  2. Describe a behavioral pattern that influences how React code is written.

  3. What is a Singleton and why might it be helpful?

  4. Throughout the program, our projects have gradually involved more and more files of smaller and smaller sizes.

    • What would you call this concept and why would you implement it?