Categorie: Tutti - encapsulation - abstraction - objects - classes

da Louis Amlea mancano 4 anni

375

INTRODUCTION TO OBJECT ORIENTED PROGRAMMING (OOP)

Object-oriented programming (OOP) is based on a hierarchy of classes and cooperating objects. Key features include inheritance, where one class derives properties from another; data abstraction, representing essential data features; polymorphism, allowing objects to take multiple forms; and encapsulation, which wraps data and methods together.

INTRODUCTION TO OBJECT ORIENTED PROGRAMMING (OOP)

INTRODUCTION TO OBJECT ORIENTED PROGRAMMING (OOP)

FEATURES OF OOP

Data Abstraction: representing only the essential features of data
Encapsulation: mechanism of wrapping up of data and methods
Inheritance: which one class derives the properties of another class
Polymorphism: ability of an object to take on many form

WHAT IS OOD?

THE IMPLEMENTATION DETAILS INCLUDE:
Implementation of associations
-Implementation of control
-Implementation of methods
-Restructuring the class data
Defining the components, interfaces, objects, classes, attributes and operations that will satisfy the requirements

WHAT IS OOAD?

A technical approach used in the analysis and design of a 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
ADVANTAGES: Easy to understand, easy to maintain, provide re-usability, reduce the development time & cost, improves the quality of system

WHAT IS OOA?

THE PRIMARY TASK IN OOA:
Describing how objects interact
Defining the function of objects
Defining the object attributes
-Organizing the objects
-Identifying objects
Process of defining the problem in terms of real-world objects

OBJECT ORIENTED CONCEPT & TERMINOLOGIES

UML: A graphical language designed to capture the artifacts of an OOAD process
OBJECT: An instance/specific example of a class
ATTRIBUTES: Data value/state that describes an object and helps you to tell one object from another of the same class
BEHAVIOUR: Operation/function that an object can perform
CLASSES AND OBJECTS
-Behaviour of objects are called as methods/member functions of a class
-Characteristics of real world object are variables/data members in a class
-OBJECT: Instance of a class
-CLASS: Template/blueprint to create an object
CAR OBJECT: A real world object and it has its own characteristic like color of the car, size model of the car,engine capacity

PROGRAMMING TECHNIQUES

A method od programming based on a hierarchy of classes, together with well-defined and cooperating objects