SlideShare a Scribd company logo
3
Most read
4
Most read
20
Most read
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 (20)

PPTX
Object Oriented Design
DivyaSure
 
PPTX
Fundamentals of Python Programming
Kamal Acharya
 
PPTX
Control structures in c++
Nitin Jawla
 
PDF
Oop
志明 陳
 
PPT
Object-oriented concepts
BG Java EE Course
 
PDF
Object oriented programming c++
Ankur Pandey
 
PPT
Object-Oriented Programming Concepts
Kwangshin Oh
 
PPT
Uml in software engineering
Mubashir Jutt
 
PPTX
Chapter 05 classes and objects
Praveen M Jigajinni
 
PDF
Polymorphism in oop
MustafaIbrahimy
 
PPTX
Introduction to oop
colleges
 
PPT
Software Project Management( lecture 1)
Syed Muhammad Hammad
 
PDF
The Object Model
yndaravind
 
PPTX
Association agggregation and composition
baabtra.com - No. 1 supplier of quality freshers
 
PPTX
Introduction to Object Oriented Programming
Moutaz Haddara
 
PPTX
Grasp
Fizza Durrani
 
PPTX
Cocomo model
Baskarkncet
 
PPT
Oop Presentation
Ghaffar Khan
 
PPTX
Fundamentals of OOP (Object Oriented Programming)
MD Sulaiman
 
PDF
Object Oriented Analysis Design using UML
Ajit Nayak
 
Object Oriented Design
DivyaSure
 
Fundamentals of Python Programming
Kamal Acharya
 
Control structures in c++
Nitin Jawla
 
Object-oriented concepts
BG Java EE Course
 
Object oriented programming c++
Ankur Pandey
 
Object-Oriented Programming Concepts
Kwangshin Oh
 
Uml in software engineering
Mubashir Jutt
 
Chapter 05 classes and objects
Praveen M Jigajinni
 
Polymorphism in oop
MustafaIbrahimy
 
Introduction to oop
colleges
 
Software Project Management( lecture 1)
Syed Muhammad Hammad
 
The Object Model
yndaravind
 
Association agggregation and composition
baabtra.com - No. 1 supplier of quality freshers
 
Introduction to Object Oriented Programming
Moutaz Haddara
 
Cocomo model
Baskarkncet
 
Oop Presentation
Ghaffar Khan
 
Fundamentals of OOP (Object Oriented Programming)
MD Sulaiman
 
Object Oriented Analysis Design using UML
Ajit Nayak
 

Viewers also liked (6)

PPT
Object Oriented Programming lecture 1
Anwar Ul Haq
 
PPT
oop Lecture 3
Anwar Ul Haq
 
PPT
Object oriented programming (oop) cs304 power point slides lecture 01
Adil Kakakhel
 
PPTX
OOP C++
Ahmed Farag
 
PPTX
#OOP_D_ITS - 4th - C++ Oop And Class Structure
Hadziq Fabroyir
 
PPT
OOP in C++
ppd1961
 
Object Oriented Programming lecture 1
Anwar Ul Haq
 
oop Lecture 3
Anwar Ul Haq
 
Object oriented programming (oop) cs304 power point slides lecture 01
Adil Kakakhel
 
OOP C++
Ahmed Farag
 
#OOP_D_ITS - 4th - C++ Oop And Class Structure
Hadziq Fabroyir
 
OOP in C++
ppd1961
 
Ad

Similar to Lecture 1 oop (20)

PPTX
Object model
Luis Goldster
 
PPTX
Object model
James Wong
 
PPTX
Object model
Tony Nguyen
 
PPTX
Object model
Harry Potter
 
PPTX
Object model
Fraboni Ec
 
PPTX
Object model
Young Alista
 
PPTX
Object model
Hoang Nguyen
 
PPT
Object oriented analysis & Design- Overview
rmk_rrj
 
PDF
ppt_ooad.pdf
anuj962198
 
PPTX
Software enginering.group-no-11 (1)
riarana10
 
PPTX
Object Oriented Programming in Systems Analysis
Allana Delgado
 
PPT
Object-Oriented Analysis and Design
RiazAhmad786
 
PPT
01 introduction
Baskarkncet
 
PPT
Object Oriented Analysis and Design - Overview
rmk_rrj
 
PPTX
1 unit (oops)
Jay Patel
 
PDF
OOAD chapter 1
Parkavi Umadoss
 
PPT
5-CEN6016-Chapter1.ppt
DrCMeenakshiVISTAS
 
PPTX
1a-OO-Basics.pptx lạoanfanfanfjasnfjnfkaskfklas
18130208
 
PPTX
ooadunitiintroduction-150730050129-lva1-app6892.pptx
ubaidullah75790
 
PDF
1unit-120324103142-phpapp02.pdf
SahajShrimal1
 
Object model
Luis Goldster
 
Object model
James Wong
 
Object model
Tony Nguyen
 
Object model
Harry Potter
 
Object model
Fraboni Ec
 
Object model
Young Alista
 
Object model
Hoang Nguyen
 
Object oriented analysis & Design- Overview
rmk_rrj
 
ppt_ooad.pdf
anuj962198
 
Software enginering.group-no-11 (1)
riarana10
 
Object Oriented Programming in Systems Analysis
Allana Delgado
 
Object-Oriented Analysis and Design
RiazAhmad786
 
01 introduction
Baskarkncet
 
Object Oriented Analysis and Design - Overview
rmk_rrj
 
1 unit (oops)
Jay Patel
 
OOAD chapter 1
Parkavi Umadoss
 
5-CEN6016-Chapter1.ppt
DrCMeenakshiVISTAS
 
1a-OO-Basics.pptx lạoanfanfanfjasnfjnfkaskfklas
18130208
 
ooadunitiintroduction-150730050129-lva1-app6892.pptx
ubaidullah75790
 
1unit-120324103142-phpapp02.pdf
SahajShrimal1
 
Ad

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

  • #3: Analysis: looking at requirements of a system and determining what the system is supposed to do.
  • #4: 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.
  • #5: 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.
  • #6: The UML is a graphical representation useful for designing and understanding object-oriented systems
  • #8: Object Oriented programming, the conceptual framework is the object model. Four major elements of object model are abstraction, modularity, encapsulation and hierarchy
  • #9: Abstraction focuses upon the essential characteristics of some object, relative to the perspective of the viewer.
  • #10: 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.
  • #11: Hiding variables and instructions within a module. Hiding all the internal details of an object from the outside world.
  • #12: 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
  • #13: Grouping statements together into functions or procedures or methods.
  • #16: To refer to a particular student in this class, we must speak of “this student” or “that student”
  • #22: Operation: work that one object performs upon another in order to elicit a reaction.