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
Cloud security ppt
Venkatesh Chary
 
PPTX
Virtual Machine
Mehul Boghra
 
PPTX
Structured Vs, Object Oriented Analysis and Design
Motaz Saad
 
PPTX
Inheritance in java
Tech_MX
 
PPTX
Virtual Machine Concept
fatimaanique1
 
PPT
Cloud deployment models
Ashok Kumar
 
PPTX
Ooad unit – 1 introduction
Babeetha Muruganantham
 
PPTX
Python Scipy Numpy
Girish Khanzode
 
PDF
Java Serialization
imypraz
 
PPT
Unit 1 - Introduction to Software Engineering.ppt
DrTThendralCompSci
 
PPTX
Formal Methods lecture 01
Sidra Ashraf
 
PDF
Cloud Computing Architecture
Animesh Chaturvedi
 
PPTX
Inheritance in JAVA PPT
Pooja Jaiswal
 
PDF
Software project management
R A Akerkar
 
PPTX
Multithreading in java
Monika Mishra
 
PPTX
Threads in JAVA
Haldia Institute of Technology
 
PPTX
Vision of cloud computing
gaurav jain
 
PPT
Lecture 12 requirements modeling - (system analysis)
IIUI
 
PPTX
Need of object oriented programming
Amar Jukuntla
 
PPTX
C# classes objects
Dr.Neeraj Kumar Pandey
 
Cloud security ppt
Venkatesh Chary
 
Virtual Machine
Mehul Boghra
 
Structured Vs, Object Oriented Analysis and Design
Motaz Saad
 
Inheritance in java
Tech_MX
 
Virtual Machine Concept
fatimaanique1
 
Cloud deployment models
Ashok Kumar
 
Ooad unit – 1 introduction
Babeetha Muruganantham
 
Python Scipy Numpy
Girish Khanzode
 
Java Serialization
imypraz
 
Unit 1 - Introduction to Software Engineering.ppt
DrTThendralCompSci
 
Formal Methods lecture 01
Sidra Ashraf
 
Cloud Computing Architecture
Animesh Chaturvedi
 
Inheritance in JAVA PPT
Pooja Jaiswal
 
Software project management
R A Akerkar
 
Multithreading in java
Monika Mishra
 
Vision of cloud computing
gaurav jain
 
Lecture 12 requirements modeling - (system analysis)
IIUI
 
Need of object oriented programming
Amar Jukuntla
 
C# classes objects
Dr.Neeraj Kumar Pandey
 

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)

PPT
OOP intro.ppt
NoreenNyauchiSarai1
 
PDF
Object-Oriented Programming (OOP)
Ahmad karawash
 
PPTX
basics of c++ object oriented programming l anguage
farooqabubakar4000
 
PPTX
introduction to object oriented programming
farooqabubakar4000
 
PPTX
CPP-Unit 1.pptx
YashKoli22
 
PPTX
Object oriented programming 6 oop with c++
Vaibhav Khanna
 
PDF
L1-Introduction to OOPs concepts.pdf
BhanuJatinSingh
 
DOC
Introduction to OOPs Concept- Features, Basic concepts, Benefits and Applicat...
KrishnaveniT8
 
PPTX
Chapter 04 object oriented programming
Praveen M Jigajinni
 
PPT
Software Engineering Lec5 oop-uml-i
Taymoor Nazmy
 
PDF
Computer_Programming_Part_II_Segment_01.pdf
et243047
 
PDF
Object And Oriented Programing ( Oop ) Languages
Jessica Deakin
 
PPT
General OOP concept [by-Digvijay]
Digvijay Singh Karakoti
 
PDF
C++ & VISUAL C++
Makaha Rutendo
 
PPTX
Object oriented programming
sana younas
 
PPT
Basic concept of OOP's
Prof. Dr. K. Adisesha
 
PPTX
Intro to oop.pptx
UmerUmer25
 
PPTX
oop.pptx
KabitaParajuli3
 
DOCX
Objects oriented programming concepts.docx
JSEThomasR
 
PDF
OOPS_Unit_1
Shipra Swati
 
OOP intro.ppt
NoreenNyauchiSarai1
 
Object-Oriented Programming (OOP)
Ahmad karawash
 
basics of c++ object oriented programming l anguage
farooqabubakar4000
 
introduction to object oriented programming
farooqabubakar4000
 
CPP-Unit 1.pptx
YashKoli22
 
Object oriented programming 6 oop with c++
Vaibhav Khanna
 
L1-Introduction to OOPs concepts.pdf
BhanuJatinSingh
 
Introduction to OOPs Concept- Features, Basic concepts, Benefits and Applicat...
KrishnaveniT8
 
Chapter 04 object oriented programming
Praveen M Jigajinni
 
Software Engineering Lec5 oop-uml-i
Taymoor Nazmy
 
Computer_Programming_Part_II_Segment_01.pdf
et243047
 
Object And Oriented Programing ( Oop ) Languages
Jessica Deakin
 
General OOP concept [by-Digvijay]
Digvijay Singh Karakoti
 
C++ & VISUAL C++
Makaha Rutendo
 
Object oriented programming
sana younas
 
Basic concept of OOP's
Prof. Dr. K. Adisesha
 
Intro to oop.pptx
UmerUmer25
 
oop.pptx
KabitaParajuli3
 
Objects oriented programming concepts.docx
JSEThomasR
 
OOPS_Unit_1
Shipra Swati
 
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.