The UML (Unified Modeling Language) is an essential "tool" for object oriented software development (OOSD) that "models" real world systems and a critical asset for beginning computer science students. There are many reasons for this, but two primary reasons are that the UML is
NOTE:
The following is a fairly complete
specification
of UML class diagrams. Consequently not every aspect need
be mastered by beginners. Students in COSC 101, COSC 200,
and COSC 201
need not worry about advanced concepts; these
are
distinguished within the text below. Those aspects that have
been omitted, in
the abridged/condensed versions of this document (for COSC 101/240/241
students), are designated,
below, with a preceeding comment "
Advanced subject".
OOSD is a continuation of the trend towards making all software development more human oriented (as opposed to computer oriented). In fact, OOPL and OOSD should be viewed as a subsets of a larger concept called Object Technology (OT) which includes object oriented databases and OO software development environments. From this viewpoint, software development can be viewed as three evolutionary improvements on the basic ideas of programming. (It is not essential for the understanding this document, but for more discussion of the evolution of OOSD, see the schematic analysis of the evolution of software developments in the introduction to Learning Module 1 for the Course COSC390, "OOSD in a Distributed Environment Using Java".) It is only important to recognize that the essence of OOSD is modelling, i.e. software developers model real world systems with software architectures. In this section we survey the basic concepts of OOSD and their associated basic constructs of OO software architectures using the terminology of the UML.
1.1 Essential "Constituents" of "Pure OOS":
"Constituents" is a nonstandard term that I use to designate the things that make up OOS (Object Oriented Software). I chose the somewhat strange word simply because other, more satisfying terms, would conflict with standard terms, i.e. ones that have specific meanings in the UML (e.g. "elements", "components", "members", and "properties", all of which have specific meanings in the UML or other OOS environments). Essential "Constituents" of "Pure" OOS (These all have specific meanings and unique schematic representations in the UML.) include the following.
1.2 Four Characteristic Features of OOPL:
The four features that really distinguish the OO approach to software development are encapsulation, visibility (access control), inheritance, and polymorphism. (Some authorities do not distinguish encapsulation and visibility, i.e. they include visibility as part of encapsulation, but I believe it is better to separate them because they are distinct (but related) concepts.) Several languages provide only encapsulation and visibility; these are typically called "object based" languages, so it is really inheritance and polymorphism that distinguish "object oriented" languages.
2. UML, THE ONLY STANDARD REPRESENTATION FOR OOSD:
The UML (Unified Modeling Language) is the only standard, language-independent way of representing OO Software. Because it is the only international standard, it should be mastered by all computer scientists (especially teachers and students) so that they can communicate the ideas of OOSD accurately. Because it is language-independent, it can be used to prototype and design a software architecture that can then be implemented in any OOPL. Therefore, when you learn the UML, you can use it in any course or in the study of any OOPL, e.g. C++, Java, Ada 95, Modula 3, etc.; a single UML architecture can be implemented in any of these languages, resulting in different looking "programs" that yield the same result. This is analogous to a single recipe being written in different languages like English, French, German, etc.; when followed, all the recipes result in the same dish. The following is a general introduction to the UML that quickly narrows its focus to the most important part of the UML, class diagrams.
UML 2.0 has 13 different
diagrams; it incorporates all the UML 1.4 diagrams. However,
since we are only using class diagrams, I will
not
discuss UML 2.0 here; for a brief overview of this new specification,
with
illustrations see the UML
NOTATION SUPPORT from VP-UML's online documentation.)
The nine UML 1.4 diagrams may be
classified as follows:| DIFFERENT
"VIEWS" OF THE UML 1.4 DIAGRAMS FIGURE 5-8, UML IN A NUTSHELL |
![]() |
| This is an memorable way to represent the different kinds of UML diagrams, i.e. the 5-compartment "picture" is easy to remember, and it helps you to recall the types of diagrams. |
| UML
DIAGRAMS REPRESENTED IN THE UML, VERSION 1.4 (from p. 66 in Instant UML) |
![]() |
| This is an interesting way to represent the different kinds of UML diagrams with a UML diagram. Each type of diagram "is-a" Diagram. This also illustrates how the UML is a "metalanguage", i.e. a language that can represent languages, in this case it represents itself! |
3.1 Encapsulation Constructs in UML Class Diagrams:
In the UML, encapsulation constructs are called "classifiers" or diagram "elements". They include the classes, interfaces, packages, and .
| EVOLUTION OF UML CD DURING THE ANALYSIS AND DESIGN PHASES |
|
| OOA Phase: Classes are identified
and their attributes and operations are specifed |
![]() |
| OOD Phase: Relationships to other
classes are defined. In the simple
form this means only the types are given; in the detailed form, the class diagram of
the types are represented. Note that the types were not given in
the detailed form, because since the relationships define these,
writing them out would be redundant. |
Simple form:![]() ![]() |
|
PARAMETRIC CLASS (TEMPLATE) & INSTANTIATED PARAMETRIC CLASS |
![]() |
| These illustrations were taken from Rational Rose Documentation. |
|
ASSOCIATION CLASS |
![]() |
| These illustrations were taken from Rational Rose Documentation. |