Classes & Instances
Class
A class is a blueprint/blueprint for an object.
- Object / Instance
- Objects are what the blueprint makes.
- An instance is an individual object.
- Objects & Instances are widely used interchangeably.
- A blueprint for a house design is like a class description. All the houses built from that blueprint are objects of that class. A given house is an instance.
Properties / Attributes
Methods
Getters & Setters
Getters & Setters
Inheritance
Inheritance
This feature of OOP is where a subclass inherits a feature (either a method or attribute) from the parent class.
class MotorVehicle: def __init__(self): self.wheels = 4 class Car(MotorVehicle): def __init__(self): MotorVehicle.__init__()
car = Car() print(car.wheels) #Here Car inherits the wheels attribute from the parent class.
Poly-morphism
Poly-morphism
Containment / Aggregation
Containment / Aggregation
Project Ideas
Project Ideas
http://muhammadallee.pbworks.com/w/file/fetch/6005943/OOP-Project-Ideas.pdf
http://moodle.manalhelal.com/pluginfile.php/991/mod_resource/content/0/CC316_F2015_ProjectIdeas.pdf