Object Modelling
OOA ( Object Oriented Analysis):
- Used to study existing object to see if they can be reused or adapted for new user.
- Define new or modified object that will be combined with existing objects into a useful business computing application.
OBJECT MODELING:
- Identifying ojects within the systems environment and the relationship between those object.
UNIFIED MODELING LANGUAGE ( UML)
- A set of modeling conventions to specify or describe a software system in term of objects.
Benefit of OOA
- break a complex system into manageable components
- create reusable components can be plugged into other system or use them as starting points for other projects
- Object-think is more realistic
OBJECT CONCEPTS
- OBJECT is something that is or is capable of being seen, touched, or otherwise sensed, and about which user store data and associate behavior.
- CLASS is set of objects that shere common attributes and behavior. A class is also referred to as an object class.
- ATTRIBUTES are the data that represent characteristics of interest about an object.
- INSTANCE of an object consist of the value for the attributes that describe a specific person, place, thing or
event
COMMON METHODS
Constructor: create a new instance of class
Query to access and get info about the state of an object but doesnot alter the state
Update to alter the state of an object and change the value of its attributes.
SUPERTYPE & SUBTYPE
Supertype is an object class whose instances store attributes that are common to one or more class subtypes of the object
Subtype is an object class whose instances inherit some common attributes from a class supertype, and then add other attributes that are unique to an instances of the subtype.
Inheritance mean that method and attributes defined in an object class ( superclass) can be inherited or reused by another object classes ( subclasses)
UML is a modelling language to express and design documents, software
- standard language for specifying , visualizing, constructing, and documenting the artifacts of software system, businese modeling and other non software systems
- Represent a collection of best engineering practices that have proven successful in the modelling of large and complex systems.
- is very important part of developing object oriented software and the software development process
- uses mostllly graphical notations to express the design of software project
- helps project teams communicate explore potential designs, and validate the architectural design of the software.
Model is an abstraction describing a subset of a system
View depicts selected aspects of a model
Notation is a set of graphical or textual rules for depiction views
Functions - user case diagram
Interaction - Sequence diagram for each use case
Object / relationships - Class / Object diagram
Behavior / logic - Statechart diagram
Use case for purpose of completing a business functions
Actor represent an external entity to interact with system to exchange information.
Temporal event is a system event that is triggered by time.
Actor communicate with:
user
External System
\Physical environment
User case
- Detemining requirements
- Communicating with clients
- Generating test cases
CLASS DIAGRAM
- gives an overview of a system by showing its classes and the relationship among them.
- Show attributes and operation of each class
- describe the overall architecture of system components
Class: a set of objects sharing a common
structure and a common behavior (Student).
Draw Class Diagram under three perspectives
- conceptual
- Specification
- Implementation
A class represent a concept
A class encapsulates state (attributes) and behavior (operations).
Each attribute has a type.
Each operation has a signature.
The class name is the only mandatory information.
Association
A relationship between instances of two classes,
where one class must know about the other to do its
work.
indicated by a straight line or arrow
Aggregation
An association where one class belongs to a
collection, e.g. instructor part of Faculty
Indicated by an empty diamond on the side of the
collection
Composition
Strong form of Aggregation
Lifetime control; components cannot exist without
the aggregate
Indicated by a solid diamond on the side of the
collection
Inheritance
An inheritance link indicating one class a
superclass relationship, e.g. bird is part of
mammal
•An object/class relationship is an association
that exists between one or more objects/classes.
It is defined by business rules and/or common
practices.
•Multiplicity defines how many instances of one
object/class can be associated with one instance
of another object/class.
Binary Association: Both entities "Know About" each other
Unary Association: A knows about B, but B knows nothing about A
Aggregation is an association with a "collection-member"
relationship
Inheritant
Classes with a set of similar attributes and operations
may be organized into a hierarchical relationship
Common attributes and operations are factored out
and assigned to a broad superclass (generalization
A class can be iteratively refined into subclasses that
inherit the attributes and operations of the superclas
Interaction Diagrams
A series of diagrams describing the dynamic
behavior of an object-oriented system.
Often used to model the way a use case is
realized through a sequence of messages
between objects.
The purpose of Interaction diagrams is to:
Model interactions between objects
Assist in understanding how a system (a use
case) actually works
Verify that a use case description can be
supported by the existing classes
Identify responsibilities/operations and assign
them to classes
A Sequence Diagram:
Indicates what messages are sent and when
Time progresses from top to bottom
Objects involved are listed left to right
Messages are sent left to right between objects
in sequence
- A Sequence Diagram depicts the
interactions among objects of a use case
during a certain period of time. It gives an
external view of object behaviors.
- A sequence diagram represents a specific set
of messages (function calls) and interchanges
between objects. Thus, objects are indicated
on the diagram instead of classes.
Types of Messages
Synchronous (flow interrupt until the message
has completed)
Asynchronous (don't wait for response)
Flat (no distinction between sysn/async)
Return (control flow has returned to the caller)
Bạn đang đọc truyện trên: Truyen2U.Com