Chap 1 - Introduction To OOP
Chap 1 - Introduction To OOP
Chap 1 - Introduction To OOP
INTRODUCTION TO OOP
The problem with procedural programming is that code reusability is hard and
limited.
The difficulties with this type of programming, is that software maintenance can be
difficult and time consuming.
When changes are made to the main procedure (top), those changes can cascade to
the sub procedures of main, and the sub-sub procedures and so on, where the change
may impact all procedures in the pyramid.
The aim of object-oriented programming is to try to increase the flexibility and
maintainability of programs. Because programs created using an OO language are
modular, they can be easier to develop, and simpler to understand after development.
OOP FUNDAMENTAL: UNDERSTANDING CLASS &
OBJECT
Methods with same name but different arguments, which will perform
different actions – methods with same name, but functioning in different
ways.
Polymorphism means one name, many forms.
There are 2 basic types of polymorphism – Overloading & Overriding.
ACCESS MODIFIERS OF CLASS MEMBERS