DRAFT EVALUATION OF AN ABRIDGED,
SIMPLIFIED, PRACTICALOVERVIEW
OF UML CLASS DIAGRAMS (with assessment
questions, hints, and
links to answers at the end)
Multiple
Choice, Fill In the Blank, and Matching Questions
Note that some of the multiple choice
questions
may have more than one correct answer; you should circle the most
appropriate
answer.
Which of the following is NOT used as a name for an object
oriented software construct? (a) nouns (b) verbs (c)
adverbs (d) adjectives
The
guideline for effective encapsulation is that
modules should be (a) _________________ and (b) _________________.
From
a (very) simple viewpoint, one could say that
inheritance allows the reuse of ____________ and polymorphism allows
the reuse of _______________.
A UML class diagram contains (a) _________________ and (b)
__________________.
...
...
...
Short
Answer Questions
(Most are from the current Preliminary Evaluation (PE) and Exit
Assessment (EA) of COSC 390.)
(PE,
K)
List the (a) three characteristic features
and
(b) two unique features of object oriented programming
languages,
e.g. C++. (c) Distinguish each with a single concise phrase on
the
same line.
(PE,
K) List
all of the encapsulation constructs of OOPL.
(b) Draw the UML representation of each.
(PE,
K) (a)
List all the fundamental "semantic"
relationships
between the encapsulation constructs of OO software;
indicate which are special cases of other
relationships. (b)Distinguish each of
these with a single concise phrase describing it on the same
line. (c) Draw its UML representation. (d)
Indicate what OOPL
facility is used to implement
each of these relationships.
(PE,
U)
What is the most important (a) similarity and
(b) difference
between
generalization and
inheritance,
between
generalization and association,
between
association
and dependency,
between
a software
model and a software architecture,
between
encapsulation and modularization,
between
visibility and information
hiding
between
class and abstract class,
between
class and
object,
between
instance and object, and
between declaration,
instantiation, and initialization, and
between operation, member
function, and method.
(PE,
S)
(With reorganization of courses, should be able to do this.) (a)
Given the following class architecture, draw the UML class diagram
that represents the architecture. Abstract class A
is a generalization of class C; A has
a virtual null method mA1 and null method mA2
that can only be used in subclasses of A. C
has private attributesaC1 and aC2
both of which are of type B
(a class); C also
has
an overloaded constructor and a public, class
method mC
which returns a class D. C
has a subclass S
that
has, as a structural "part", an attribute aS1
which is an array of type E
(a class) and an attribute aS2
of type CC (a
class)
where aS2 has a coincident lifetime with S,
i.e. when an instance of S is destroyed, the instance
of aS2
is automatically destroyed as well. S
also overrides the method mC.
I/O is accomplished via an application UI that
contains a main
method
that instantiates classes C and S. Be
sure to include the directionality and multiplicities of all
relationships.
(NOTE: if you are not typing your answer
to
this question, use underline to indicate italics. Also use an
asterisk
to distinguish declaration by reference in C++.)
(PE,
S) (a)
Draw the
UML class diagrams with inter-class relationships for an "efficient"
object
oriented architecture of a "Square Analyzer" application that
determines
the area, perimeter, and location of
squares
from data input by a user. Use, among others, three classes: (1) Square
which calculates the area and perimeter, (2) UserInterface
which instantiates a variable testSquare of type Square
and allows the user to give it various values, and (3) Point2D
which
specifies the location of a point (which is used to designate a
square's center).
(b) Expand this architecture by incorporating the MOST useful abstract
class for this software architecture. (c) Write
a
skeleton code for the C++ implementation of this architecture;
do
NOT write the code for any of the methods (Replace this with comments.).
(U/synthesis; update of Q) Illustrateall
the basic UML class diagram constructs using five connected
rectangles to represent (1) encapsulation (including visibility,
class/instance attributes,
and member syntax) and (2) semantic
relationships (including UML names, colloquialisms, navigability, and
multiplicity).
(U/synthesis) Why
are UML
class diagrams important in COSC 101 thru COSC 241?
{Not
yet available} See
some "draft"
hints and answers to these questions