Important Concepts
What are Design Patterns?
Goal of good Object Oriented Design
To create elegant, maintainable code arranged into objects.
Design is NOT about regurgitating known Design Patterns.
Object Oriented Design Steps
Object Oriented Design Steps:
1. Handle Ambiguity
Questions/Problems are often vague(intentionally in interviews, less intentionally in real life)
Ask Clarifying questions:
* Use the “Six W’s”:
- WHO is going to use it
- WHAT
- WHY
- WHERE will it be used
- WHEN will it be used (time, frequency of use, etc)
- HOW are they going to use it
Object Oriented Design Steps:
2. Define Core Objects
Object Oriented Design Steps:
3. Analyze Relationships
Object Oriented Design Steps:
4. Investigate Actions
Assess the Key Actions that objects take, and how they relate to other objects.
Likely to have forgotten some objects
Design Patterns:
Two Extremely Common Design Patterns in Interviews
(Note: you should know many more design patterns than these)
Singleton Pattern:
Overview
Factory Design Pattern:
Overview
OOP Design Principles:
10 Key Principles
Page: https://hackernoon.com/10-oop-design-principles-every-programmer-should-know-f187436caf65