Object Oriented SE
Object Oriented SE
Module-3
Object Oriented Design Techniques/Methods
Object-oriented
modeling is
frequently
accomplished using
the
Unified Modeling
Language (UML)
• Class Diagram
• Sequence Diagram
• Collaboration Diagram
• State Diagram
OO approach
generally include
four aspects:
Identity means that data is quantized into discrete, distinguishable entities
identity, called objects
classification, Classification means that objects with the same data structure ( attributes)
and behavior ( operations) are grouped into a class.
polymorphism. Polymorphism means that the same operation may behave differently for
different classes.
Abstraction consists Objects are instances of classes. A Encapsulation (also information hiding) consists of
of focusing on the class is a definitive Description of a separating the external aspects of an object, which
essential, inherent group of objects with similar are accessible to other objects, from the internal
aspects of an entity properties and behaviors. Classes are details of the object, which are hidden from other
and ignoring its abstract, objects are concrete. Objects objects.
accidental aspects. are aware of their class identity. •Objects have an outside (how they are seen or
interact) and an inside (what they are.)
Polymorphism
Inheritance
•Polymorphism is the kindred to the incorporation of data and
behavior. From the outside, the same operation Solve or Draw Inheritance is a mechanism
applies to various objects (solvable or, respectively, for sharing similarities among
drawable). The object user is not burdened with the classes while preserving their
implementation - the inside - of the object. The object knows differences
how to do the job.
https://forms.gle/pr8DLWavGE9qGiQb7
• Class: An entity that has a well-defined role in the application domain, as well
as state, behavior, and identity
– Tangible: person, place or thing
– Concept or Event: department, performance, marriage, registration
– Artifact of the Design Process: user interface, controller, scheduler
• Object: a particular instance of a class
• Actors: A role that a user plays with respect to the system, including human users and
other systems. e.g., inanimate physical objects (e.g. robot); an external system that needs
some information from the current system.
• Use case: A set of scenarios that describing an interaction between a user and a system,
including alternatives.
• System boundary: rectangle diagram representing the boundary between the actors
and the system.
Boundary
Department of Computer Application 20MCA24-Software Engineering 26 August 2022
Use-Case Diagrams 35
• Association:
communication between an actor and a use case; Represented by a solid line.
• Generalization: relationship between one general use case and a special use
case (used for defining special alternatives) Represented by a line with a
triangular arrow head toward the parent use case.
Include: a dotted line labeled <<include>> beginning at base use case and ending
with an arrows pointing to the include use case. The include relationship occurs when a
chunk of behavior is similar across more than one use case. Use “include” in stead of
copying the description of that behavior.
<<include>>
Extend: a dotted line labeled <<extend>> with an arrow toward the base case. The
extending use case may add behavior to the base use case. The base class declares
“extension points”.
<<extend>>
Borrow Employee
Client
Order Title
Fine Remittance
Supervisor
enhanced entity–relationship
Association is used to
represent the relation
between the classes.
Many-to-many association. An association describes a set of potential
links in the same way that a class describes a set of potential objects.
• Association:
– Relationship among object classes
• Association Role:
– Role of an object in an association
– The end of an association where it connects to a class
• Multiplicity:
– How many objects participate in an association. Lower-bound. Upper
bound (cardinality).
Unary
Lower-bound – Upper-bound
Ternary
if
you want two
links between the
same objects,
you must have Association vs. link. You can use multiple associations to model
multiple links between the same objects.
two associations.
Ordering the objects for an association end. Ordering sometimes occurs for “many”
multiplicity.
▪ An association class is an
association that is also a class.
▪ Like the links of an association,
the instances of an association
class derive identity from instances
of the constituent classes. An association class. The links of an
▪ Like a class, an association class association can have attributes.
can have attributes and operations
and participate in associations.
▪ We can find association classes by
looking for adverbs in a problem
statement or by abstracting known
values.
Association classes. Attributes may also occur for
one-to-many and one-to-one associations.
Department of Computer Application 20MCA24-Software Engineering 26 August 2022
Association Classes.. 57
A qualified association is an
association in which an attribute Qualified association. Qualification increases the precision of a
called the qualifier disambiguates the model.
objects for a “many” association end.
It is possible to define qualifiers for
one-to- many and many-to-many
associations.
The word generalization derives from the fact that the superclass generalizes
the subclasses.
Specialization refers to the fact that the subclasses refine or specialize the
superclass.
Inheritance is the mechanism for sharing attributes, operations, and associations
via the generalization/specialization relationship.
Scenario/Tasks: An institution may issue many credit card accounts, each identified by
an account number. Each account has a maximum credit limit, a current balance, and a
mailing address. The account serves one or more customers who reside at the mailing
address. The institution periodically issues a statement for each account. The statement
lists a payment due date, finance charge, and minimum payment. The statement
itemizes various transactions that have occurred throughout the billing interval: cash
advances, interest charges, purchases, fees, and adjustments to the account. The name
of the merchant is printed for each purchase.
▪ An institution may issue many credit card accounts, each identified by an account number.
▪ Each account has a maximum credit limit, a current balance, and a mailing address.
▪ The account serves one or more customers who reside at the mailing address.
▪ The institution periodically issues a statement for each account.
▪ The statement lists a payment due date, finance charge, and minimum payment. The
statement itemizes various transactions that have occurred throughout the billing interval:
cash advances, interest charges, purchases, fees, and adjustments to the account.
▪ The name of the merchant is printed for each purchase.
The UML incorporates a language that can express these kinds of questions—the
Object Constraint Language (OCL)