OOPs
Encapsulation
Bundling of data with the methods that operate on that data. making fields in a class private and providing access to the fields via public methods. prevents the code and data being randomly accessed by other code defined outside the class
Polymorphism Adv.
Code Reusability - Programmers can create new subclasses with different functionality without rewriting all the code in the parent class Program Maintnance - If there is an error in one part of the code, the parent class can easily be changed, and it will affect all of the subclasses. Complexity - By using a base set of classes and simply extending those classes, code becomes shorter and easier to understand.
Programming team Adv.
Cover weakness More ideas Can take on large projects
Object
Instance of a class
Inheritance
Mechanism wherein a new class is derived from an existing class. The new classes may inherit or acquire the properties and methods of other classes
Library Adv.
Reusability - Saves time
Inheritance Adv.
Reusability - facility to use public methods without rewriting the same methods Polymorphism- New functionality may be easily plugged in without changing existing classes as long the new plug-in classes extend given base classes. Data hiding - base class can decide to keep some data private so that it cannot be altered by the derived class Overriding- Override the methods of the base class so that meaningful implementation of the base class method can be designed in the derived class.
OOP DisAdv.
Simple problems become much more complex due to nature of OOP
Polymorphism
The characteristic of an object that allows it to respond with different behaviors to the same message or method because of changes in external conditions.
Encapsulation Adv.
The fields of a class can be made read-only or write-only A class can have total control over what is stored in its field Easier maintenance + flexibility Increases usability
Programming team DisAdv.
Weakness may undermine whole team Members have different styles Need to communicate