INTRODUCTION TO OBJECT ORIENTED PROGRAMMING (OOP)
PROGRAMMING TECHNIQUES
A method od programming based on a hierarchy of classes, together with well-defined and cooperating objects
OBJECT ORIENTED CONCEPT & TERMINOLOGIES
CAR OBJECT: A real world object and it has its own characteristic like color of the car, size model of the car,engine capacity
CLASSES AND OBJECTS
-CLASS: Template/blueprint to create an object
-OBJECT: Instance of a class
-Characteristics of real world object are variables/data members in a class
-Behaviour of objects are called as methods/member functions of a class
BEHAVIOUR: Operation/function that an object can perform
ATTRIBUTES: Data value/state that describes an object and helps you to tell one object from another of the same class
OBJECT: An instance/specific example of a class
UML: A graphical language designed to capture the artifacts of an OOAD process
WHAT IS OOA?
Process of defining the problem in terms of real-world objects
THE PRIMARY TASK IN OOA:
-Identifying objects
-Organizing the objects
Defining the object attributes
Defining the function of objects
Describing how objects interact
WHAT IS OOAD?
A technical approach used in the analysis and design of a system
ADVANTAGES: Easy to understand, easy to maintain, provide re-usability, reduce the development time & cost, improves the quality of system
DISADVANTAGES: All time is not easy to determine all the necessary classes and objects required for a system, offers a new project management so it may be difficult to complete a solution with estimated time and budget, without an explicit reuse on a large scale
WHAT IS OOD?
Defining the components, interfaces, objects, classes, attributes and operations that will satisfy the requirements
THE IMPLEMENTATION DETAILS INCLUDE:
-Restructuring the class data
-Implementation of methods
-Implementation of control
Implementation of associations
FEATURES OF OOP
Polymorphism: ability of an object to take on many form
Inheritance: which one class derives the properties of another class
Encapsulation: mechanism of wrapping up of data and methods
Data Abstraction: representing only the essential features of data