B3.2 Fundamentals of OOP for multiple classesB3.2.5
Commonly Used Design Patterns in OOP
Explain commonly used design patterns in OOP
AHL≈ 60 minCommand term: ExplainPremium
In this lesson
- Describing what a design pattern is and its three categories
- Explaining the singleton, factory and observer patterns and the problem each solves
- Recognising each pattern’s structure in code
- Choosing a suitable pattern for a scenario and stating its drawbacks
This lesson is part of Premium
Every topic has one free lesson. Premium unlocks every interactive lesson, the exam-style questions at the end of each one, and the rest of Praxis IB.
What's inside
- LearnProven solutions to recurring problems
- SingletonSingleton: exactly one object
- FactoryFactory: one place that creates objects
- ObserverObserver: tell everyone who asked
- ObserverObserver in code
- LearnThe patterns’ structure in UML
- LearnSummary of the three patterns
- CheckWhich pattern fits?
- CheckQuick check
- ExamWorked exam answer
- ReviewMistakes examiners see
- Exam practiceExam-style questions
Ends with 4 exam-style questions worth 14 marks, with a self-marking markscheme.