Beruflich Dokumente
Kultur Dokumente
Point1 Point2
x = -10 x = 10
y = 10 y = 10
Polygon1
Point3 Point4
x = -10 x = 10
y = -10 y = -10
Dont add multiplicities yet. Consider that each point has an X and a Y coordinate. How can
you express the fact that points are in an order?
c) Consider two triangles sharing a common side as depicted by figure 4. Draw an according
object diagram for each of the cases of point object allocation named in b).
(0, 1) (1, 1)
Figure 4: Triangles
The class diagram in figure 5 expresses the following issue about a car management system:
A person can have up to three companies as employer.
The employer IDs are equal to the company IDs the person is working for.
Cars can be owned by persons, companies or banks.
The car owner ID is equal to the ID of the person, the company or the bank owning the
car.
The purchase of a car may be associated with a car credit granted by a bank.
Unfortunately several classes contain attributes, which are actually pointers to other objects
and could be replaced by associations. It would be inconvenient to keep an object model
where pointers are hidden in class attributes.
Draw a class diagram, in which the pointers are replaced by associations. Introduce
generalizations where useful. Try to determine the multiplicities correctly.
Draw a class diagram for a graphic editor, which supports the concept of grouping. Assuming
that a document has several pages every page contains the following graphic objects: text,
geometrical objects and groups. Geometrical objects are e.g. circles, ellipses, rectangles, lines
and squares. A group is simply a set of graphic objects, which can contain further groups for
its part. A group has to contain at least two graphic objects. A graphic object can be a direct
member of at most one group.
You are a software developer working in a company which develops bank software systems.
A customer has sent the following short description of a new software system:
a) Identify the classes, attributes, operations, associations and inheritance structures in the
description above and draw a class diagram.
b) Create an object diagram assuming some data samples on your own.