Chapter 8: Understanding Is Development Tools: Object Orientation
Chapter 8: Understanding Is Development Tools: Object Orientation
OBJECT ORIENTATION
Object-oriented programming
o A method of implementation in which programs are organized as a co-operative
collection of objects, each of which represents an instance of some class, and who
classes are all members of a hierarchy of classes united via inheritance relationship.
(Booch, 1991)
o Objects
Something to which action are directed.
It has an identity, state and exhibits behaviour
Conclusion:
o Object = an instance of class of object (i.e. a group of objects together make up a class
of object).
All the objects in the class exhibit a common set of object attributes, such as
structure & behavior.
Class
o The group of objects that share a common structure and behavior
o Often structured in hierarchy, which shares certain properties
o Microsoft Windows based programs use a hierarchy of windows classes to ensure each
window behaves in the same way no matter which application is running
o Benefit of inheritance
Code can be reused
Time saves and efficiency benefits
York
Data surrounded by
the white which is the
processing /
operations that act on
the data.
Shell
Surrounds the whole
thing and keeps it all
together
Hides the data and
processes from the
outside world
(encapsulated)
Network of objects
o Make up a program.
o OO program is simple a collection of interrelated objects where the connections are
unidirectional paths along which messages are sent.
o Programs begins with an initiation from outside (event)
Triggers an object, from then on that object initiates others and so on.
A graphical language, or a notation, for modeling systems analysis and design concepts in an
object oriented fashion.
7 goals:
i. Provide users a ready-to-use, expressive, visual modelling language so they can
develop and exchange meaningful models.
ii. Provide extensibility and specialization mechanisms to extend the core concepts.
iii. Be independent of particular programming languages and development processes.
iv. Provide a formal basis for understanding the modelling language.
v. Encourage the growth of the object-oriented tools market.
vi. Support higher-level development concepts.
vii. Integrate best practices and methodologies
Most people use subset of UML and as Booch et al (1997) says “you can model 80% of most
problems by using about 20% of the UML”.
Class diagram
O Used for modeling static structure in UML
O Class is represented as rectangle separated into 3 parts:
Class name
Attribute
Omit in the low
level design
Operation
Association between the class student and the class of Degree. Eg.
student is registered for a degree
Represent relationship
between instance of
classes / relationship
between entities.
Interaction diagram
O Attempt to model dynamic behavior
Describe the
O 2 interaction diagrams Sequence diagram interaction between
Collaboration diagram objects and messages
in a system
Sequence diagram
O Shows the interaction between objects and messages over time
O Time represented on the vertical axis
O Object / class depicted from left to right on the horizontal
Object
(unique name for the state)
Activity diagram
O Described as a variation of a statechart that replaces events with activities
Focus on internal flows & activities rather than events.
O Can indicates activities that can be performed in parallel or that must wait for another
activity to complete before starting.
Synchronization bar
(Can perform in parallel)
Must both complete before the next
activity
SUB CONCLUSION