CHAP
2 : OBJECT-ORIENTED MODELING & DESIGN |
Object-Oriented development
-
A new way of thinking about software based on abstractions that exist in
the real world
-
The essence of object-oriented development is the identification and organization
of application demain concepts, rather than their final representation
in a programming language.
Object-oriented methodology
-
Coad/Yourdon
-
Rumbough-Object modeling techniques (OMT)
-
Objectory and Object-oriented sofware Engineering
-
Object-oriented system analysis (OSA)
-
.......
The methodology that is going to be presented is OMT
Object Modeling Techniques (OMT)
-
An object-oriented development methodology that uses object, dynamic and
functional medels throughout the development life cycle.
-
Software stage
-
Analysis
-
A stage in the development cycle in which real world problem is examined
to understand its requirement wihout planning the implementation.
-
System design
-
The first stage of design, during which high-level decisions are made about
the overall structure of the system, its architecture, and the stratergies
used to implement the system.
-
Object Design
-
A stage of the development cycle during which the implementation of each
class, association, attribute, and operation is determined.
-
Implementation
-
A stage in the development life cycle in which a design is realized in
an executable form, such as a programming language or hardware.
OMT models
-
The OMT uses three models to describe a system
-
Object Models, Dynamic Models & Functional Medels
-
Object Model (WHAT)
-
The static structure of the object in a system that includes the identity,
relationships to other objects, attributes and operation.
-
Dynamic Model (WHEN)
-
The aspect of a system that change overtime - concerned control, including
time, sequencing operation and interaction of objects.
-
Functional Model (HOW)
-
The aspect of a system that tranform values using functions, mapping, constraint
and functional dependencies.
Object Model
Capture the static structure of a system
-
relationship between objects
-
the attributes and operations that characterize each class of objects
-
Important concepts
-
object and class
-
link and association
-
aggregation
-
generalization and inheritance
Object and classes
-
Object - refer to exactly one thing and can be distinguished
-
Example:
Classes
-
refer to a group of similar thing
-
a group of similar object with similar properties (operation), common relationships
to other objects and common semantics.
-
Example :
Object Diagram
A formal graphic notation for modeling objects, classes and their relationship
to one another.
-
Class diagram
-
schema, pattern or template for describing many possible instances.
-
Instance diagram
-
how a particular set of objects relate to each other.
-
example :
Attributes
-
A named property of a class describing a data value held by each object
of the class.
-
Example :
Operations and Methods
-
Operations
-
is a function or tranformation that may be applied to object in a class
-
Method
-
is the implementation of an operation for a specific class
-
Example:
Links and Associations
-
A link
-
is a physical or conceptual connection between object instances
-
An association
-
describes a groups a group of links with common structure and common semantics.
One-to-one association and link
Many-to-many association and links
Ternary association and links
Multiplicity
-
specify how many instances of one class may relate to a single instance
of an associated class.
-
specify with a number or set of intervals:
-
"1" exactly
one
-
"1+" one or more
-
"3-5" three to five, inclusive
-
"2,4,18" two, four, or eighteen
-
example :
Multiply of Associations

Aggregation
-
Aspecial form of association between a whole and its part, in which the
whoke is composed of the parts.
-
Example:
Generalization and Inheritance
-
Powerful abstraction for sharing similarities among classses while preserving
the differences.
-
Generalization
-
is the relationship between a class and one or more refined version of
it.
-
Inheritance
-
is an object-orientaed mechanism that permits classes to share attributes
and operations based on a relationship, usually generalization.
Multilevel Aggregation
Latihan
Latihan 1
-
List the object classes that is needed to make up this course. Prepare
an object diagram that shows the relationship among the object classes.
Include association, aggregations and generalizations.
-
Prepare an instance disgram for the class diagram below for the expression
(X+Y/2)/(X/3+Y)
Latihan 2
Kuiz 1
Preapare an object diagram for a graphical document editor that supports
gouping, which is a concept used in a variety of graohical editors, including
text, geometrical objects and groups. A group is simply a set of drawing
object, possibly including other groups. A group must contain at least
two drawing objects. A drawing object can be a direct member of at most
one group. Geometrical objects include circles, ellipses, rectangle, line
and squares.
Assignment
Sediakan object diagram untuk menunjukkan sekurang-kurangnya 10 hubungan
di antara object classes berikut. Termasuk association, aggregation dan
generalization. Gunakan qualified association dan tunjukkan multipicity
dalam rajah anda. Anda tida perlu menunjukkan atrribut dan operasi. Gunakan
nama association jika diperlukan.Dalam menyediakan rajah, kemungkinan ada
penambahan object classes baru.
-
school, playground, principal, school board, classroom, book, student,
teacher, cafeteria, rest room, computer, desk, chair, ruler, door, swing.
-
castle, moat, drawbridge, tower, ghost, stairs, dungeon, floor, corridor,
room, window, stone,lord, lady, cook.
-
expression, constant, variable, function, argument list, relational operator,
term,factor, arithmetic operator, statement, program.
-
file system, file, directory, file name, ASCII file, executable file, directory
file, disk, drive, track, sector.
-
automobile,engine, wheel, brake, brake light, door, battery, muffler, tail
pipe.
-
gas furnace blower, blower motor, room thermostat, furnace thermostat,
humidifier, humidity sensor, gas control, blower control, hot air vents.
-
chess piece, rank, file, square, board, move, position, sequence of moves
-
sink, freezer, refrigerator, table, light, switch, window, smoke alarm,
burglar alarm, cabinet, bread, cheese, ice, door, kitchen.
Tarikh akhir hantar ialah pada 15/12/1998. Penghantaran lewat
tarikh tersebut tidak akan dilayan.