Discussion Questions for Fowler, Chapter 3
Class Diagrams
Properties: Attributes and Associations
-
"As a first approximation , you can think of properties as corresponding to
fields of a class." (Fowler 35) How safe is this "approximation", are the
class fields always equivalent to the properties (as defined in UML)?
--Dimitar
-
Fowler mentions that attributes and associations are the same thing in that
most of the same information appears in both notations (36). One
difference he mentions is that associations can show multiplicities at both
ends of the line. What are some other visible/key differences between
attributes and associations? (Mike C)
-
Can't there be meaningful classes that only have get, set, and print
methods? Why aren't these methods meaningful? (Mike L.)
-
Are there any conventions when to use broken lines for class diagrams? (Monica)
-
Where exactly is the line drawn between get and set giving away
implementation and not giving away implementation? (Mike L.)
-
When would we need to assign to a multivalued property? Or alternately,
when would it be advantageous to do so over updating with add and remove
methods? (Alex)
-
When would one not use bidirectional association? It seems that usually two
objects will have a mutual relationship. (Andy)
-
Which is better, implementation-focused interpretation or
interface-oriented interpretation of class diagrams? (Monica)
Multiplicity
-
Besides the examples given, are there any other qualifiers that would be
handy in modifying the elements in a multivalued multiplicity? (Alex)
Operations
-
In Operations topic, if the getting and setting methods are "entirely
internal to the class," then how can we use other classes to help on tasks
that are beyond the capabilities of the class? (Chayapan)
Generalization and Interfaces
-
Has the issue of unwanted inheritence in the Vector class disappeared
because java now allows one to make an over-riding Vector class that does
not have to implement all of Java's vector class, or because Java's Vector
class has improved, and people no longer want to rewrite it?
-
On Pg 51 Fowler says that Assertions reduce the chances of inheritance
redefining a subclass's operations to be inconsisitent with the
superclass's operations. The subclasses can choose to strengthen these
assertions but cannot weaken them. However, pre-condition, cannot be
strengthened. I understand that in most cases it cannot be strengthened,
but can't there be even one case where it might have to be strengthened?
(Gaurav)
-
Fowler says on Pg 44, that with conceptual models we shouldnt use it to
specify the interface of a class. Why so? (Gaurav)
-
Wouldn?t using an interface turn a cycle of dependencies into a set of
dependencies that all fed into the interface? (Jonathan)
Dependencies
-
Can you give any tips to avoid dependencies? (David D)
-
While talking about dependencies Fowler says that we ?should be wary of
cycles.? Are cycles just a series of dependencies that form a loop, or are
they something else? (Jonathan)
-
What's the big difference between "assocition" and "dependency" ? Shouldn't
we treat them the same? (Chayapan)
-
How safe are the dependancy rules used by UML in practical programming? Do
they work seamlessly, or do they require programmer fine-tuning? -- Dimtar
-
Fowler writes on pg. 48 that UML has many varieties of dependencies and he
mentions a basic dependency. What are some other types of dependencies and
how do they differ from the basic dependency? Fowler also states that the
basic dependency is not transitive. What are some kinds of dependencies
that are transitive? (Mike C)
Constraints
-
In figure 3.1 Fowler labels what appears to be a comment a constraint (I
think the comment contains a constraint, however). Is this an example of
Fowler using UML to sketch out information, or is this actually normative
notation? (John)
-
What's the "UML's formal Object Constraint Language (OCL)"? Example please?
Relationships between UML and Programming Languages
-
What significant differences exist between the UML class diagram and an
actual language class specification? (Andy)
-
What does Fowler mean by "language that supports porperties" (pg 40)?
(Saugar)
Other Questions
-
"The majority of UML diagrams I see are class diagrams. (pg 35)" What are
the other types of UML diagrams? (Saugar)
-
Can you give more examples of queries and modifiers? (David D)
-
Fowler briefly mentions meta-classes, which I assume correspond to
templates in C++. How common are meta-classes in object oriented
languages? Do Java and C# have them? (John)
-
It would be nice to be able to apply these principles in the real-world,
even at this early stage. What is a program on MathLAN that we can use to
actually do this UML stuff?
This document is available on the World Wide Web as
http://www.cs.grinnell.edu/~walker/courses/223.sp05/readings/fowler-3.shtml