OOAD
OOAD
OOAD
V SEMESTER
OBJECT
• An object is a real world element in an object – oriented environment
that may have a physical or a conceptual existence
• Eg: car, customer, book etc.,
CLASS
• A class represent a templet collection of object having same
characteristic properties that exhibit common behaviour
ENCAPSULATION :
• The process of binding both attributes and method together within
class
• Attributes: Data of an object. ,Properties of an object.
• Methods: Procedures of an object. or Behavior of an object.
• The term object was for formal utilized in the similar language. The
term object means a combination or data and logic that represent
some real-world entity.
• When developing an object oriented applications, two basic questions
arise,
• What objects does the application need?
• What functionality should those objects have?
Car
Cost
Make
Color
Model Attributes of object
• Object Behavior and Methods:
• We can describe the set of things that an object can do on its own (or)
we can do with it.
For example: Consider an object car, We can drive the car. We can
stop the car.
• A method is a function or procedures that is defined in a class and
typically can access to perform some operation.
• Behavior denotes the collection of methods that abstractly describes
what an object is capable of doing.
• Objects Respond to Messages: The capability of an object’s is
determined by the methods defined for it.
• To do an operation, a message is sent to an object. Objects
represented to messages according to the methods defined in its class
• For example:
• When we press on the brake pedal of a car, we send a stop message
to the car object. The car object knows how to respond to the stop
message since brake have been designed with specialized parts such
as brake pads and drums precisely respond to that message.
car
Class Hierarchy
• The properties and behaviors are used as the basis for making distinctions
between classes are at the top and more specific are at the bottom of the class
hierarchy
Inheritance
• It is the property of object-oriented systems that allow objects to be
built from other objects.
• Inheritance allows explicitly taking advantage of the commonality of
objects when constructing new classes.
• Inheritance is a relationship between classes where one class is the
parent class of another (derived) class.
• The derived class holds the properties and behavior of base class in
addition to the properties and behavior of derived class.
Dynamic Inheritance
Can fly
pilot planes
Flown
by
Aggregation
• Since each object has an identity, one object can refer to other
objects. This is known as aggregation. The car object is an aggregation
of other objects such as engine, seat and wheel objects.
• Static and Dynamic Binding:
• Determining which function has to be involved at compile time is
called static binding. Static binding optimized the calls. (Ex) function
call.
• The process of determining at run time which functions to involve is
termed dynamic binding.
• Dynamic binding occurs when polymorphic call is issued. It allows
some method invocation decision to be deferred until the information
is known.
• Object Persistence:
• Objects have a lifetime. They are explicitly created and can exist for a
period of time that has been the duration of the process in which they
were created.
• A file or database can provide support for objects having a longer
lifeline, longer than the duration of the process for which they are
created. This characteristic is called object persistence.
•
Define a Domain Model
• This model illustrates the important concepts Player, Die, and Dice
Game, with their associations and attributes.
• It is a visualization of the concepts or mental models of a real- world
domain. Thus, it has also been called a conceptual object model.
Assign Object Responsibilities and Draw Interaction Diagrams
Roll()
Fv2:getfacevalue()
• Define Design Class Diagrams: a static view of the class definitions is
usefully shown with a design class diagram. This illustrates the
attributes and methods of the classes.
• example: in the dice game, an inspection of the sequence diagram
leads to the partial design class diagram .Since a play message is sent
to a DiceGame object, the DiceGame class requires a play method,
while class Die requires a roll and get FaceValue method.
UML DIAGRAMS
• There are two main categories; structure diagrams and behavioral
diagrams.
• Structure diagrams show the things in the modelled system. In a
more technical term, they show different objects in a system
• Behavioural diagrams show what should happen in a system. They
describe how the objects interact with each other to create a
functioning system.
Class Diagram
less project failure, better productivity, and lower defect rates; shown
by research into iterative and evolutionary methods
early rather than late mitigation of high risks (technical, requirements,
objectives, usability, and so forth)
early visible progress
early feedback, user engagement, and adaptation, leading to a refined
system that more closely meets the real needs of the stakeholders
managed complexity; the team is not overwhelmed by "analysis
paralysis" or very long and complex steps
the learning within an iteration can be methodically used to improve the
development process itself, iteration by iteration
Key Ideas and Best Practices will manifest in elaboration:
Table -Sample elaboration artifacts, excluding those started in inception.
Artifact Comment
Domain Model This is a visualization of the domain concepts; it is similar to a static information model
of the domain entities.
This is the set of diagrams that describes the logical design. This includes software class
Design Model diagrams, object interaction diagrams, package diagrams, and so forth.
Software A learning aid that summarizes the key architectural issues and their resolution in the
Architecture design. It is a summary of the outstanding design ideas and their motivation in the
Document system.
Data Model This includes the database schemas, and the mapping strategies between object and
non-object representations.
Use-Case A description of the user interface, paths of navigation, usability models, and so forth.
Storyboards, UI
Prototypes
What is a Domain Model?
• A domain model is a visual representation of conceptual classes or
real- situation objects in a domain . Domain models have also been
called conceptual models domain object models, and analysis object
models.
• Definition: In the UP, the term "Domain Model" means a
representation of real-situation conceptual classes, not of software
objects. The term does not mean a set of diagrams describing
software classes, the domain layer of a software architecture, or
software objects with responsibilities.
• A domain model is illustrated with a set of class diagrams in which no
operations (method signatures) are defined. It provides a conceptual
perspective. It may show:
1. domain objects or conceptual classes
2. associations between conceptual classes
3. attributes of conceptual classes
Why Call a Domain Model a "Visual Dictionary"?
• Domain Model visualizes and relates words or concepts in the domain.
It also shows an abstraction of the conceptual classes, because there
are many other things one could communicate about registers, sales,
and so forth.
• The domain model is a visual dictionary of the noteworthy abstractions,
domain vocabulary, and information content of the domain
• A UP Domain Model is a visualization of things in a real-situation domain of
interest, not of software objects such as Java or C# classes, or software objects
with responsibilities.
Therefore, the following elements are not suitable in a domain model:
• Software artifacts, such as a window or a database, unless the domain being
modeled are of software concepts, such as a model of graphical user interfaces.
• Responsibilities or methods
• Two Traditional Meaning of Domain Model
Meaning 2 :"the domain layer of software objects." That is, the layer of software
objects below the presentation or UI layer that is composed of domain objects
software objects that represent things in the problem domain space with related
"business logic" or "domain logic" methods.
DOMAIN MODEL
• The figure shows a partial domain model drawn with UML class
diagram notation. It illustrates that the conceptual classes of Payment
and Sale are significant in this domain, that a Payment is related to a
Sale in a way that is meaningful to note, and that a Sale has a date
and time, information attributes we care about.
CONCEPTUAL CLASSES