Object Oriented Programming
- Mental model:
Every thing is object -
Object has
- Contents: What it has
- Characteristics: What it can do
-
Library as a system
- Objects:
- book:
- characterstics:
- rent
- contents:
- id
- author
- title
- characterstics:
- librarian
- characteristics:
- lend books
- collect books
- Contents:
- username
- emailid
- characteristics:
- User:
- Characteristic:
- rent book
- return book
- pay subscription
- Contents:
- username
- mobileno
- Characteristic:
- rack
- Characteristics:
- Find book
- List of books
- Contents:
- books
- Characteristics:
- book:
- Objects:
Relationships between Objects
- On a broader note we have two kinds of relationships
- Inheritence: is-a relationship
- Composition: has-a relationship
Inheritence
- Is-a: Get parent characteristics and contents in child objects

