際際滷

際際滷Share a Scribd company logo
C++(introduction)
C++(introduction)
Session Objectives
Define Class & Objects
Characteristics of OOPS
Introduction to Objects
All around us in the
real world are
objects.
Each object has
certain
characteristics and
exhibits certain
behaviour
C++(introduction)
Data
Color : Black
Year : 2008
Actions
Start
Stop
Accelerate
OBJEC
T
The Object-Oriented
Approach - III
PersonnelAccounts Sales
The real world around is full of objects .We can consider both living
beings as well as things as objects.For example,the different
departments in a company are objects.
Why OOPs Concept are Used?
The drawbacks of Traditional Programming
approach are
Unmanageable Programs
Code Reusability not Optimum
Problems in Modification of Data
Difficulty in Implementation
Object  Oriented Programming
Accounts
Data
Employee details
Salary statements
Bills
Vouchers
Reciepts
Functions
Calculate salary
Pay salary
Pay bills
Tally accounts
Transact with banks
Here the application has to implement the entities as they are
seen in real life and associate actions and attributes with each.
Benefits of Object Oriented Programming approach
are -
 OOP offers better implementation
 OOP offers better data security
 OOP offers better code reusability
 OOP offers more flexibility
 OOP offers better manageable programs
 Large complexity in the software development
can be easily managed
 User defined datatypes can be easily constructed
Object Oriented Approach
Problem
Identification Analysis
Design
Development
Testing
Implementation
Maintenance
 Data acquisition Systems
 Client/Server Computing
 Object Oriented Database applications
 Artificial Intelligence and expert systems
 systems such as process control, temperature control etc.
 GUI based system such as Windows Applications
 Computer Aided Design and manufacturing Systems
Encapsulation
Data Abstraction
Inheritance
Polymorphism
Class
Grouping of data and methods into a
single entity is known as Data
Encapsulation
It is a technical name for
information hiding. (i.e data hiding or
data security)
Encapsulation
Not accessible from
outside class
Accessible from outside
class
Private
Public
Class
Data abstraction enhances security as use
of data is restricted to certain functions
only.
Abstraction is more used where you
want only a certain number of
functions/methods are accessing data.
Attributes
Methods
Class
For Example
Data abstraction is a process of
identifying properties and
methods related much to a
particular entity as relevant to the
application
It is the process of
creating a new class from
an existing class
Reusability
Programs can be
broken into reusable
objects
Existing classes can be
used with additional
features
Shape
Benefits of Inheritance
 polymorphism allows a programmer to
purse a course of action by sending a
message to an object without concerning
about how the software system is to
implement the action
Simply defined as Same thing
can behave different ones
Class -
Artiste
Dancer PoetSculptor
Class : Shape
Methods :
Draw
Move
Initialize
Subclasses
A class is what defines all the data
members and the methods that an object
should have.
The class defines the characteristics that
the object will possess; it could also be
referred to as a blueprint of the object.
For Example
Polygon
objects
Polygon class
Properties
Vertices
Border Color
Fill Color
Methods
Draw
Erase
Move
Abstract
into
C++(introduction)

More Related Content

C++(introduction)

  • 3. Session Objectives Define Class & Objects Characteristics of OOPS Introduction to Objects
  • 4. All around us in the real world are objects. Each object has certain characteristics and exhibits certain behaviour
  • 6. Data Color : Black Year : 2008 Actions Start Stop Accelerate OBJEC T
  • 7. The Object-Oriented Approach - III PersonnelAccounts Sales The real world around is full of objects .We can consider both living beings as well as things as objects.For example,the different departments in a company are objects.
  • 8. Why OOPs Concept are Used? The drawbacks of Traditional Programming approach are Unmanageable Programs Code Reusability not Optimum Problems in Modification of Data Difficulty in Implementation
  • 9. Object Oriented Programming Accounts Data Employee details Salary statements Bills Vouchers Reciepts Functions Calculate salary Pay salary Pay bills Tally accounts Transact with banks Here the application has to implement the entities as they are seen in real life and associate actions and attributes with each.
  • 10. Benefits of Object Oriented Programming approach are - OOP offers better implementation OOP offers better data security OOP offers better code reusability OOP offers more flexibility OOP offers better manageable programs Large complexity in the software development can be easily managed User defined datatypes can be easily constructed
  • 11. Object Oriented Approach Problem Identification Analysis Design Development Testing Implementation Maintenance
  • 12. Data acquisition Systems Client/Server Computing Object Oriented Database applications Artificial Intelligence and expert systems systems such as process control, temperature control etc. GUI based system such as Windows Applications Computer Aided Design and manufacturing Systems
  • 14. Grouping of data and methods into a single entity is known as Data Encapsulation It is a technical name for information hiding. (i.e data hiding or data security)
  • 15. Encapsulation Not accessible from outside class Accessible from outside class Private Public Class
  • 16. Data abstraction enhances security as use of data is restricted to certain functions only. Abstraction is more used where you want only a certain number of functions/methods are accessing data.
  • 17. Attributes Methods Class For Example Data abstraction is a process of identifying properties and methods related much to a particular entity as relevant to the application
  • 18. It is the process of creating a new class from an existing class
  • 19. Reusability Programs can be broken into reusable objects Existing classes can be used with additional features Shape
  • 21. polymorphism allows a programmer to purse a course of action by sending a message to an object without concerning about how the software system is to implement the action Simply defined as Same thing can behave different ones
  • 22. Class - Artiste Dancer PoetSculptor Class : Shape Methods : Draw Move Initialize Subclasses
  • 23. A class is what defines all the data members and the methods that an object should have. The class defines the characteristics that the object will possess; it could also be referred to as a blueprint of the object.
  • 24. For Example Polygon objects Polygon class Properties Vertices Border Color Fill Color Methods Draw Erase Move Abstract into