0% found this document useful (0 votes)
158 views

Class Lecture Notes 5

The document appears to be a quiz result from a UML class on modeling with class and object diagrams. The quiz consisted of 12 multiple choice questions covering topics like the differences between class and object diagrams, modeling compositions and generalizations, defining associations and cardinalities, and modeling example scenarios using class diagrams. The student answered 0% of the questions correctly and can view feedback on each question.

Uploaded by

Thành Long Bùi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views

Class Lecture Notes 5

The document appears to be a quiz result from a UML class on modeling with class and object diagrams. The quiz consisted of 12 multiple choice questions covering topics like the differences between class and object diagrams, modeling compositions and generalizations, defining associations and cardinalities, and modeling example scenarios using class diagrams. The student answered 0% of the questions correctly and can view feedback on each question.

Uploaded by

Thành Long Bùi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

7/21/23, 12:29 AM Class - Lecture notes 5

2/20/22, 12:04 PM UML Quiz - Result

LOGIN HELP

UML Quiz

Quiz Score
You have solved Class diagram with 59 Questions.
0.00% Questions were answered correct.
Get some feedback by viewing each Question.

Which of the following differences between class


Question 1:
diagrams and object diagrams are true?
Class diagrams describe a system on type level, object diagrams on
instance level.
Class diagrams describe the structure of a system. object diagrams
describe the shape of a system at a certain point in time.
Class diagrams model the structure of a system, object diagrams model
the dynamic view.
Both diagram types are used for modeling the structural aspects of a
system.

Class diagrams and object diagrams use completely different notations.

Which of the following statements about


Question 2:
compositions (composite aggregations) are true?
The multiplicity of a composite aggregation may be ≥1.
The multiplicity can either be 0 or 1.

In a composition, a part may belong to only one composite at a time.

When the composite element is deleted, the parts also die.


Yes, if the multiplicity is 1.

The composite aggregation is a transitive relationship.

Which of the following optional information can be


Question 3:
given on an association between classes?
An arrow at the end to show navigability.

Multiplicity at the end of an association.


elearning.uml.ac.at/submitQuiz 1/23

about:blank 1/23
7/21/23, 12:29 AM Class - Lecture notes 5

2/20/22, 12:04 PM UML Quiz - Result

A small filled triangle near the association name to show in which way to
"read" the name.
Name

How do you model the following situation with a


Question 4:
UML2 class diagram:
An event may be part of another event.
reflexive association

reflexive association and aggregation

enumeration

reflexive association and composition

Question 5: A generalization ...


... may be overlapping or disjoint.

... may be complete or incomplete.

... allows taxonomical relations between superclasses and subclasses.

... allows a class to inherit the behavior of another class.

... allows using the instance of a subclass when the instance of a


superclass is expected.

You are given the following clipping of a UML2 class


Question 6:
diagram. Which of the following statements are true?

elearning.uml.ac.at/submitQuiz 2/23

about:blank 2/23
7/21/23, 12:29 AM Class - Lecture notes 5

2/20/22, 12:04 PM UML Quiz - Result

An instance of A can see y.

Objects of B and D can see g.

Objects of C and B can see f.


f is private, thus objects of C cannot see it.

An object of A may or may not contain objects of C.

Question 7: To define the cardinalities of ternary associations ...


... you have to set the cardinality of two classes to one and determine the
cardinality of the third class.
... you look at each of the classes separately.

... you have to set the cardinality of one class to one and determine the
cardinality of the other two classes.
... you can proceed as if it was a binary association, determining the
cardinalities in pairs.

Question 8:How do you model the following situation with a


UML2 class diagram:
FurnitureFritz charges custom-made furniture which is
assembled from prefabricated components.

Question 9: You are given the following clipping of a UML2 class


diagram. Which of the following object diagrams are consistent
with the class diagram?

elearning.uml.ac.at/submitQuiz 3/23

about:blank 3/23
7/21/23, 12:29 AM Class - Lecture notes 5

2/20/22, 12:04 PM UML Quiz - Result

A composition (composite aggregation) may


Question 10:
express that ...
... when a customer is deleted from a database, all his orders are deleted
as well (dependency).
... a building part can consist of other building parts but not of itself (no
cycles).
... the brain is part of the human but not the other way round
(asymmetry).

Question 11: Primitive data types ...


... are defined strictly and cannot be defined by the user.
UML2 has four pre-defined data types (namely String, Boolean,
Integer, UnlimitedNumber), additionally, the user can define other data
types using the keyword <<primitive>>.

... have no internal structure.

... are a synonym for classes.

... cannot have operations.

How do you model the following situation with a


Question 12:
UML2 class diagram:
elearning.uml.ac.at/submitQuiz 4/23

about:blank 4/23
7/21/23, 12:29 AM Class - Lecture notes 5

2/20/22, 12:04 PM UML Quiz - Result

A trip might comprise of multiple tours, one tour can be included


in several trips.

Question 13: Associations ...


... may have navigable and non-navigable association directions.

... may have multiplicities to indicate to how many instances of a class


the object is associated to.
... have to be identified by a unique association name
The name is optional.

... show possible relations between instances of classes.

Question 14:How do you model the following situation with a


UML2 class diagram:
Every restaurant has at least one kitchen, one kitchen is part of
exactly one restaurant.

You are given the following clipping of a UML2 class


Question 15:
diagram. Which of the following statements are true?

elearning.uml.ac.at/submitQuiz 5/23

about:blank 5/23
7/21/23, 12:29 AM Class - Lecture notes 5

2/20/22, 12:04 PM UML Quiz - Result

One tenant can rent the same flat several times with different leasing
contracts.
To make that possible the association has to be {nonunique}.

One tenant rents exactly one flat.


One tenant can rent no flat, one flat or multiple flats because the multiplicity
is *.

One flat can be rented by multiple tenants with different leasing


contracts.
One tenant can rent multiple flats with different leasing contracts.

Question 16:How do you model the following situation with a


UML2 class diagram:
A doctor treats multiple patients, a patient can be treated by
multiple doctors. To document which doctor has when treated
which patient, the date and time of each treatment are stored. It
has to be possible that a doctor treats the same patient multiple
times.

Question 17: You are given the following clipping of a UML2 class
diagram. Which of the following object diagrams are consistent
with the class diagram?

elearning.uml.ac.at/submitQuiz 6/23

about:blank 6/23
7/21/23, 12:29 AM Class - Lecture notes 5

2/20/22, 12:04 PM UML Quiz - Result

Question 18: Data types in UML2 ...


... can have attributes but no operations.
Just like classes, data types may have operations and attributes.

... have instances without identity (in contrast to classes)..

... can be primitive types and enumerations.

... are noted like classes with the keyword <<datatype>> (or another
pre-defined type, e.g. <<enumeration>>).

Question 19: Which of the following statements are true


A class must never have a relationship with itself.
This is possible, e.g.: Class Person, association childOf -> a Person is
childOf another Person.

If an object can only have one out of several associations, this may be
modeled with a {xor} relationship.
A role name is noted in the upper left corner of a class symbol.
A role name is noted on the association ends.

You can specify the names of the roles the classes play in the
relationship on the association ends.

You are given the following clipping of a UML2 class


Question 20:
diagram. Which of the following statements are true?

elearning.uml.ac.at/submitQuiz 7/23

about:blank 7/23
7/21/23, 12:29 AM Class - Lecture notes 5

2/20/22, 12:04 PM UML Quiz - Result

An appointment can be made for multiple participants.

It is possible to navigate from a person to the appointments that he is in


charge of.
One person can be included in several groups.

There are groups that do not have any persons assigned.

One group can consist of several persons.

It is possible to navigate from an appointment to the person who is in


charge of it.
A participant that has been assigned to an appointment can be group
and person at the same time.
There are appointments that do not have any participants assigned yet.

Groups can only consist of persons, they cannot comprise of other


groups.
A reference can be assigned to multiple appointments.

Several persons are in charge of one appointment.

If an appointment is deleted all references linked with it are deleted as


well.
If a group is deleted all persons that are in that group are deleted as well.

Question 21: Relate the following terms!


How is the following concept called?
Class A is associated with class B, but B is never associated with A.
- please choose -

An aggregation is a special ...


- please choose -

What is a synonym for strong aggregation?


- please choose -

How is the following concept called?


If class A is associated with class B, and class B is associated with class C, then also A is associated with C.
- please choose -

elearning.uml.ac.at/submitQuiz 8/23

about:blank 8/23
7/21/23, 12:29 AM Class - Lecture notes 5

2/20/22, 12:04 PM UML Quiz - Result

Which of the following statements about shared


Question 22:
aggregations are true?
Chains of shared aggregation links may form a cycle..
Chains of shared aggregation links build a graph without any cycles.

A shared aggregation is shown by a solid-filled diamond on the end of an


association line.
A shared aggregation is shown by a hollow diamond, this solid-filled
diamond represents a composition (composite aggregation).

Shared aggregations are used to express an is-a relationship.


Shared aggregations express part-of relationships.

The multiplicity of a shared aggregation may be ≥1.

You are given the following clipping of a UML2 class


Question 23:
diagram. Which of the following statements are true?

The association between A and D can be navigated coming from A.

One object of B is associated with exactly two objects of A.

Several objects of A are associated with exactly one object of B or one


object of C.
One object of A is associated with exactly one object of B or one object of C.

One object of A is associated with exactly one object of B or one object of


C.

Question 24: How do you model the following situation with a


UML2 class diagram:
A fitness center consists of several sectors. One sector may be
divided into several sectors which might as well be divided into
sectors and so on.
reflexive association

reflexive association and aggregation

elearning.uml.ac.at/submitQuiz 9/23

about:blank 9/23
7/21/23, 12:29 AM Class - Lecture notes 5

2/20/22, 12:04 PM UML Quiz - Result


enumeration

reflexive association and composition

Question 25: You are given the following clipping of a UML2 class
diagram. Which of the following object diagrams are consistent
with the class diagram?

Question 26:How do you model the following situation with a


UML2 class diagram:
During one soccer season, multiple players participate in
multiple games. Each player scores in each game a certain
number of goals.

elearning.uml.ac.at/submitQuiz 10/23

about:blank 10/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 11/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 12/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 13/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 14/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 15/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 16/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 17/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 18/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 19/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 20/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 21/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 22/23
7/21/23, 12:29 AM Class - Lecture notes 5

about:blank 23/23

You might also like