HowTo CreateAnObjectDiagram
HowTo CreateAnObjectDiagram
The object-oriented analysis (OO analysis) helps to identify the structure and to specify all necessary
information for a specific IT application by defining objects as carriers for information. The concrete
data is stored in the values of the attributes of these objects; certain types (classes) of objects are
responsible for their specific associated information, which leads to a meaningful structure of object
types (classes) to model the entire, sometimes highly complex, application.
In the section of the cinema program shown, one can obviously recognize 3 different movies and thus
3 independent objects (instances/examples) of the type Movie. The most important attributes are
immediately identifiable: a title, a short synopsis, the duration of the film in minutes, an age
restriction (FSK) and assigned movie genres.
Note! The timestamp specified in the schedule (date plus time) and the associated cinema hall are not
attributes of a movie. That would be a highly useless structuring of the information. Why? One unique
instance of movie – now we need to differentiate between the terms identity and equality – can be
shown as often as you like (generalization of the example shown). This means that the appointment
attribute cannot simply be a date/time of object Movie. Now some students could come up with the
idea of storing not just one appointment for this attribute, but a whole list of dates/times:
Solution: You need to realize that additional types of objects are needed to structure the relevant
information in a meaningful way. An object of type Show will be responsible for the what (movie),
when (date/time) and where (cinema/hall). Movies and cinema halls are independent objects. The
cinema hall for example is clearly identifiable, has attributes (e.g. size, equipment, ...) and is multiply
reused as a non-mutable object in other shows. The show on the other side has three attributes:
movie, cinema hall and the date/time appointment. An object of the Show class thus brings together
two other objects, movie and cinema hall, and also assigns an appointment to this pair. We call such
an object type an associative class.
Reusability: Finally, it is helpful to model already (at the time of the analysis) fixed terms as non-
mutable objects so they can be reused in a bigger context. These for example are the object types
“age rating” and “film genre”. The special feature of these object types (classes) is that we can
enumerate the possible objects here and now – this is called enumeration:
Film genre: children's film, cartoon, drama, action, sci-fi, horror, ...
Using the object types described here, the appropriate object diagram has been created (see
solution). Note the standardized UML notation, which you can find in many sources (including
textbooks).