Object Oriented Programming
-
Use case: Imagine we are building a vehicle parking system
-
Till now in python or in languages like C, Can you come up with design.
-
Approach:
- Procedural
- Object Oriented Programming
-
Object Oriented Programming:
- Everything is object
- Object has
- Capabilities (What it can do)
- Contents ( What it has)
-
Example
- Laptop
- Contents:
- Keyboard
- CPU
- Display
- Characteristics/Capabilities:
- Browse
- Code
- Start
- Shutdown
- Contents:
- Laptop
-
Relationships:
- No Relation
- is-a
- has-a
Find objects and Relationships for
- Attendence at workplace
- Spend Analyzer
