The document provides an introduction to object-oriented analysis and design (OOAD). It defines OOAD as a process of analyzing problems and developing solutions by planning in UML or pseudocode. Object-oriented analysis focuses on discovering key classes, while object-oriented design models real-world objects and communication between objects through interfaces. The document also outlines principles of object-oriented programming including classes, objects, inheritance, and polymorphism.
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.
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
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”
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.
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
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
Analysis: looking at requirements of a system and determining what the system is supposed to do.
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.
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.
The UML is a graphical representation useful for designing and understanding object-oriented systems
Object Oriented programming, the conceptual framework is the object model. Four major elements of object model are abstraction, modularity, encapsulation and hierarchy
Abstraction focuses upon the essential characteristics of some object, relative to the perspective of the
viewer.
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.
Hiding variables and instructions within a module. Hiding all the internal details of an object from the outside world.
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
Grouping statements together into functions or procedures or methods.
To refer to a particular student in this class, we must speak of “this student” or “that student”
Operation: work that one object performs upon another in order to elicit a reaction.