SlideShare a Scribd company logo
Programming Using C++ /
Introduction to Programming with
C++
ICT 120 / CSD 106
Introduction to Object-Oriented Analysis
and Design (OOAD)
• What is OOA?
– It is a method of analysis that examines
requirements from the perspective of the classes
and objects found in the vocabulary of the problem
domain
– The chief OOA activity is discovering and
documenting the key classes for a particular
problem domain
Introduction to Object-Oriented Analysis
and Design (OOAD)
• What is OOAD?
– It is the generic term for the process of analyzing a
problem and developing an approach for solving it.
– Essential for large programs
– Plan in pseudocode or Unified Modeling Language
(UML)
• UML is widely used
Introduction to Object-Oriented Analysis
and Design (OOAD)
• What is OOD?
– It is a method of design encompassing the process
of object-oriented decomposition and a notation
for depicting both logical and physical as well as
static and dynamic models of the system under
design.
– OOD
• Models real-world objects in software
• Models communication among objects
• Encapsulates attributes and operations (behaviors)
– Information hiding
» Communication through well-defined interfaces
Introduction to Object-Oriented Analysis
and Design (OOAD)
• UML
– Graphical representation scheme
– Enables developers to model object-oriented systems
– Flexible and extensible (capable of being enhanced with
new features)
• Some UML Features
– Use Case Diagrams
– Class Diagrams
– Sequence Diagrams
– Collaboration Diagrams
– Activity Diagrams
Overview of Object-Oriented Programming
• Object Oriented Programming (OOP)
– A method of implementation in which programs
are organized as cooperative collections of objects,
each of which represents an instance of some class,
and whose classes are all members of a hierarchy
of classes united via inheritance relationships.
– OOP is centered around the object
– Classes are generally viewed as static, whereas
objects typically have a much more dynamic
nature.
Overview of Object-Oriented Programming
• Object Oriented Programming (OOP)
– Conceptual Framework
• Object model
– Abstraction
– Encapsulation
– Modularity
– Hierarchy
Overview of Object-Oriented Programming
• Conceptual Framework
– Object model
• Abstraction
Overview of Object-Oriented Programming
• Conceptual Framework
– Object model
• Abstraction
– An abstraction denotes the essential characteristics of an
object that distinguish it from all other kinds of objects and
thus provide crisply defined conceptual boundaries, relative to
the perspective of the viewer
– Abstraction pays attention to important properties while
ignoring details
Overview of Object-Oriented Programming
• Conceptual Framework
– Object model
• Encapsulation:
Overview of Object-Oriented Programming
• Conceptual Framework
– Object model
Overview of Object-Oriented Programming
• Conceptual Framework
– Object model
• Modularity: is the process of dividing a program into
modules which can be compiled separately, but which
have connections with other modules.
Overview of Object-Oriented Programming
• Conceptual Framework
– Object model
• Hierarchy:
– Classes of objects are arranged into hierarchies that model and
describe relationships among the classes.
– The most important hierarchies in a complex system are:
» Class structure “is a ” hierarchy
» Object structure “part of ” hierarchy
– Examples:
» Inheritance: “is a”
• generalization/specialization
» Aggregation/Composition: “part of”
Overview of Object-Oriented Programming
• Basic principles behind using OOP techniques
involve:
– Classes
– Objects
– Inheritance
– Polymorphism
Overview of Object-Oriented Programming
• Basic principles behind using OOP techniques
involve:
– Class
• A class is a set of objects that share a common attributes
and a common behaviour.
• A class consists of a category of things.
• A class definition describes all the attributes of member
objects of that class as well as the methods that
implement the behavior of member objects
– Example
• Class Student
– This represents the characteristics common to all students
Overview of Object-Oriented Programming
• Basic principles behind using OOP techniques
involve:
– Object
• Object is any thing. It is a specific item that belongs to a
class. It is called an instance of a class
• Object is an entity that has attributes, behaviour and
identity
• The attributes and behaviour of an object are defined by
the class definition.
Overview of Object-Oriented Programming
Example of Class vs Object
Overview of Object-Oriented Programming
• Basic principles behind using OOP techniques
involve:
– Inheritance
• A form of software reuse in which the programmer
creates a class that absorbs an existing class’s data and
behaviours and enhances them with new capabilities
• Base class
– Existing class
• Derived class
– New class
Overview of Object-Oriented Programming
– Inheritance: Example
Student
GraduateStudent UndergraduateStudent
Base Class
Derived Class
Overview of Object-Oriented Programming
– Polymorphism
Overview of Object-Oriented Programming
– Polymorphism
• A concept in type theory, according to which a name
may denote objects of many different classes that are
related by some common superclass; thus, any object
denoted by this name is able to respond to some
common set of operations in different ways.
• It is feature that allows the same operation to be carried
out differently depending on the object.
• It allows you to create new objects that perform the
same functions as the base object but which perform
one or more of these functions in a different way.

More Related Content

What's hot

Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
thinkphp
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
koolkampus
 

What's hot (20)

Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
Procedural vs. object oriented programming
Procedural vs. object oriented programmingProcedural vs. object oriented programming
Procedural vs. object oriented programming
 
Oop
OopOop
Oop
 
Oops ppt
Oops pptOops ppt
Oops ppt
 
Object Oriented Programming Using C++
Object Oriented Programming Using C++Object Oriented Programming Using C++
Object Oriented Programming Using C++
 
C++ chapter 1
C++ chapter 1C++ chapter 1
C++ chapter 1
 
Python Functions
Python   FunctionsPython   Functions
Python Functions
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Concepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming LanguagesConcepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming Languages
 
Abstraction
AbstractionAbstraction
Abstraction
 
Characteristics of OOPS
Characteristics of OOPS Characteristics of OOPS
Characteristics of OOPS
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
Data structures using c
Data structures using cData structures using c
Data structures using c
 
Object Oriented Programming in Python
Object Oriented Programming in PythonObject Oriented Programming in Python
Object Oriented Programming in Python
 
Basics of Object Oriented Programming in Python
Basics of Object Oriented Programming in PythonBasics of Object Oriented Programming in Python
Basics of Object Oriented Programming in Python
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
 
Inheritance in OOPS
Inheritance in OOPSInheritance in OOPS
Inheritance in OOPS
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigm
 
Interface
InterfaceInterface
Interface
 

Viewers also liked (6)

Object Oriented Programming lecture 1
Object Oriented Programming lecture 1Object Oriented Programming lecture 1
Object Oriented Programming lecture 1
 
oop Lecture 3
oop Lecture 3oop Lecture 3
oop Lecture 3
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01
 
OOP C++
OOP C++OOP C++
OOP C++
 
#OOP_D_ITS - 4th - C++ Oop And Class Structure
#OOP_D_ITS - 4th - C++ Oop And Class Structure#OOP_D_ITS - 4th - C++ Oop And Class Structure
#OOP_D_ITS - 4th - C++ Oop And Class Structure
 
OOP in C++
OOP in C++OOP in C++
OOP in C++
 

Similar to Lecture 1 oop

1 unit (oops)
1 unit (oops)1 unit (oops)
1 unit (oops)
Jay Patel
 
1a-OO-Basics.pptx lạoanfanfanfjasnfjnfkaskfklas
1a-OO-Basics.pptx lạoanfanfanfjasnfjnfkaskfklas1a-OO-Basics.pptx lạoanfanfanfjasnfjnfkaskfklas
1a-OO-Basics.pptx lạoanfanfanfjasnfjnfkaskfklas
18130208
 
1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf
SahajShrimal1
 

Similar to Lecture 1 oop (20)

Object model
Object modelObject model
Object model
 
Object model
Object modelObject model
Object model
 
Object model
Object modelObject model
Object model
 
Object model
Object modelObject model
Object model
 
Object model
Object modelObject model
Object model
 
Object model
Object modelObject model
Object model
 
Object model
Object modelObject model
Object model
 
Object oriented analysis & Design- Overview
Object oriented analysis & Design- OverviewObject oriented analysis & Design- Overview
Object oriented analysis & Design- Overview
 
ppt_ooad.pdf
ppt_ooad.pdfppt_ooad.pdf
ppt_ooad.pdf
 
Software enginering.group-no-11 (1)
Software enginering.group-no-11 (1)Software enginering.group-no-11 (1)
Software enginering.group-no-11 (1)
 
Object Oriented Programming in Systems Analysis
Object Oriented Programming in Systems AnalysisObject Oriented Programming in Systems Analysis
Object Oriented Programming in Systems Analysis
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and Design
 
01 introduction
01 introduction01 introduction
01 introduction
 
Object Oriented Analysis and Design - Overview
Object Oriented Analysis and Design - OverviewObject Oriented Analysis and Design - Overview
Object Oriented Analysis and Design - Overview
 
1 unit (oops)
1 unit (oops)1 unit (oops)
1 unit (oops)
 
OOAD chapter 1
OOAD chapter 1 OOAD chapter 1
OOAD chapter 1
 
5-CEN6016-Chapter1.ppt
5-CEN6016-Chapter1.ppt5-CEN6016-Chapter1.ppt
5-CEN6016-Chapter1.ppt
 
1a-OO-Basics.pptx lạoanfanfanfjasnfjnfkaskfklas
1a-OO-Basics.pptx lạoanfanfanfjasnfjnfkaskfklas1a-OO-Basics.pptx lạoanfanfanfjasnfjnfkaskfklas
1a-OO-Basics.pptx lạoanfanfanfjasnfjnfkaskfklas
 
ooadunitiintroduction-150730050129-lva1-app6892.pptx
ooadunitiintroduction-150730050129-lva1-app6892.pptxooadunitiintroduction-150730050129-lva1-app6892.pptx
ooadunitiintroduction-150730050129-lva1-app6892.pptx
 
1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf
 

Lecture 1 oop

  • 1. Programming Using C++ / Introduction to Programming with C++ ICT 120 / CSD 106
  • 2. Introduction to Object-Oriented Analysis and Design (OOAD) • What is OOA? – It is a method of analysis that examines requirements from the perspective of the classes and objects found in the vocabulary of the problem domain – The chief OOA activity is discovering and documenting the key classes for a particular problem domain
  • 3. Introduction to Object-Oriented Analysis and Design (OOAD) • What is OOAD? – It is the generic term for the process of analyzing a problem and developing an approach for solving it. – Essential for large programs – Plan in pseudocode or Unified Modeling Language (UML) • UML is widely used
  • 4. Introduction to Object-Oriented Analysis and Design (OOAD) • What is OOD? – It is a method of design encompassing the process of object-oriented decomposition and a notation for depicting both logical and physical as well as static and dynamic models of the system under design. – OOD • Models real-world objects in software • Models communication among objects • Encapsulates attributes and operations (behaviors) – Information hiding » Communication through well-defined interfaces
  • 5. Introduction to Object-Oriented Analysis and Design (OOAD) • UML – Graphical representation scheme – Enables developers to model object-oriented systems – Flexible and extensible (capable of being enhanced with new features) • Some UML Features – Use Case Diagrams – Class Diagrams – Sequence Diagrams – Collaboration Diagrams – Activity Diagrams
  • 6. Overview of Object-Oriented Programming • Object Oriented Programming (OOP) – A method of implementation in which programs are organized as cooperative collections of objects, each of which represents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships. – OOP is centered around the object – Classes are generally viewed as static, whereas objects typically have a much more dynamic nature.
  • 7. Overview of Object-Oriented Programming • Object Oriented Programming (OOP) – Conceptual Framework • Object model – Abstraction – Encapsulation – Modularity – Hierarchy
  • 8. Overview of Object-Oriented Programming • Conceptual Framework – Object model • Abstraction
  • 9. Overview of Object-Oriented Programming • Conceptual Framework – Object model • Abstraction – An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer – Abstraction pays attention to important properties while ignoring details
  • 10. Overview of Object-Oriented Programming • Conceptual Framework – Object model • Encapsulation:
  • 11. Overview of Object-Oriented Programming • Conceptual Framework – Object model
  • 12. Overview of Object-Oriented Programming • Conceptual Framework – Object model • Modularity: is the process of dividing a program into modules which can be compiled separately, but which have connections with other modules.
  • 13. Overview of Object-Oriented Programming • Conceptual Framework – Object model • Hierarchy: – Classes of objects are arranged into hierarchies that model and describe relationships among the classes. – The most important hierarchies in a complex system are: » Class structure “is a ” hierarchy » Object structure “part of ” hierarchy – Examples: » Inheritance: “is a” • generalization/specialization » Aggregation/Composition: “part of”
  • 14. Overview of Object-Oriented Programming • Basic principles behind using OOP techniques involve: – Classes – Objects – Inheritance – Polymorphism
  • 15. Overview of Object-Oriented Programming • Basic principles behind using OOP techniques involve: – Class • A class is a set of objects that share a common attributes and a common behaviour. • A class consists of a category of things. • A class definition describes all the attributes of member objects of that class as well as the methods that implement the behavior of member objects – Example • Class Student – This represents the characteristics common to all students
  • 16. Overview of Object-Oriented Programming • Basic principles behind using OOP techniques involve: – Object • Object is any thing. It is a specific item that belongs to a class. It is called an instance of a class • Object is an entity that has attributes, behaviour and identity • The attributes and behaviour of an object are defined by the class definition.
  • 17. Overview of Object-Oriented Programming Example of Class vs Object
  • 18. Overview of Object-Oriented Programming • Basic principles behind using OOP techniques involve: – Inheritance • A form of software reuse in which the programmer creates a class that absorbs an existing class’s data and behaviours and enhances them with new capabilities • Base class – Existing class • Derived class – New class
  • 19. Overview of Object-Oriented Programming – Inheritance: Example Student GraduateStudent UndergraduateStudent Base Class Derived Class
  • 20. Overview of Object-Oriented Programming – Polymorphism
  • 21. Overview of Object-Oriented Programming – Polymorphism • A concept in type theory, according to which a name may denote objects of many different classes that are related by some common superclass; thus, any object denoted by this name is able to respond to some common set of operations in different ways. • It is feature that allows the same operation to be carried out differently depending on the object. • It allows you to create new objects that perform the same functions as the base object but which perform one or more of these functions in a different way.

Editor's Notes

  1. Analysis: looking at requirements of a system and determining what the system is supposed to do.
  2. Pseudocode – An informal text based means of expressing program logic. It is not actually a programming language but can be used as a kind of outline to guide you in writing code.
  3. Design: Looking at how the system should work Object-oriented decomposition uses classes and objects abstractions to logically structure systems. OOD provides a natural and intuitive way to view the software design process - namely, modeling objects by their attributes, behaviours and interrelationships just as we describe real world objects. Communication: Objects communicates via message just as people send messages to one another. A bank account object may receive a message to decrease its balance by a certain amount because the customer has withdrawn that amount of money. Encapsulation: wraps attributes and operations (behaviours) into objects. An object has a property of information hiding this means that objects may know how to communicate with one another across well defined interfaces but normally may not know how other objects are implemented. For instance one can drive a car without knowing how the details of how car engines, transmissions, brakes, etc works internally.
  4. The UML is a graphical representation useful for designing and understanding object-oriented systems
  5. Object Oriented programming, the conceptual framework is the object model. Four major elements of object model are abstraction, modularity, encapsulation and hierarchy
  6. Abstraction focuses upon the essential characteristics of some object, relative to the perspective of the viewer.
  7. An abstraction focuses on the outside view of an object, and so serves to separate an object's essential behavior from its implementation. When we drive a car we often need to change the gears of the vehicle but we are not concerned about the inner details of the vehicle engine. What matters to us is that we must shift a gear, that's it. This is abstraction; show only the details that matter to the user.
  8. Hiding variables and instructions within a module. Hiding all the internal details of an object from the outside world.
  9. Abstraction and encapsulation are complementary concepts: abstraction focuses upon the observable behavior of an object, whereas encapsulation focuses upon the implementation that gives rise to this behavior
  10. Grouping statements together into functions or procedures or methods.
  11. To refer to a particular student in this class, we must speak of “this student” or “that student”
  12. Operation: work that one object performs upon another in order to elicit a reaction.