4 principles of Oops
Abstraction:
Hide Implementation and let the implementing class take care of details. It is generalisation. Abstract base class.
Encapsulation:
Hide the data within the scope of class and allow access to properties through access modifiers. private fields /variables
Inheritance:
Derived class inherits the base class. It is specialisation class. SportsCar : Car | MUV : Car
Is -A Relationship
Polymorphism :
Overloading and Override Method.
Composition class- has a relationship Product --compose of price class, Ingredient Classs
No comments :
Post a Comment