- Learnt about Dart Classes and Objects
- Understood what properties and methods of a class are
- Property : Variable associated with a class
- Method : Function associated with a class
- Object : Instance of the class we created
- Learnt about the 4 pillars of OOP using the car analogy
-
Abstraction : Split functionality into different components that have their own defined roles
-
Encapsulation : Classes are strictly separated and interact only sometimes otherwise they are fully independent of each other
-
Inheritance : A class inheriting properties and methods from its parent class
Say parent class is called Car
//New child class
class ElectricCar extends Car{}
-
Polymorphism : We override some properties or methods of parent class using the @override keyword, can also have super.(method name)
- Learnt how to do the exact same thing(i.e. creating the Question class) in 2 different ways and changing its children classes accordingly