OBJECT ORIENTED PROGRAMMING Flashcards
Define the 4 main concepts of OPP.
Abstraction: Providing only essential information about data while hiding it’s background : implementation or details
Polymorphism: It is the abiliy for a message to be displayed in more than one form
Inheritacnce: It is when a class derives properties and methods from another class
Encapsulation: It is wrapping up data in a single unit
What is data hiding and modularity?
data hiding: it is restricting access to data and implementation details
modularity: It is an organizational software design principle where a system is divided into independent, seprerate, and cohesive components
what are the types of inheritance?
single, multiple, hierachical and multilevel inheritance
What is a method?
It is a function associated with a class
Why is data hiding important?
It protects sensitive data from being accessed or modified
What is a constructor and why is it important?
It is a special method within a class that is called when an object of that class is created.
Advatages:
* To initialiaze values fot the data members of an object
* To perform neccessar setup task for an object