Set 7 - UML class Diagrams Part 1

Quiz by Dr Suriya S - PSGCT

Feel free to use or edit a copy

includes Teacher and Student dashboards

### Measure skillsfrom any curriculum

Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.

• edit the questions
• save a copy for later
• start a class game
• view complete results in the Gradebook and Mastery Dashboards
• automatically assign follow-up activities based on students’ scores
• assign as homework
• share a link with colleagues
• print as a bubble sheet

### Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

24 questions
• Q1

Attribute of a class is derived, can only be read, has return type integer, has public visibility and is named simpleInterest. Identify the correct representation.

~/simpleInterest: Integer

#/simpleInterest: Integer

+/simpleInterest: Integer

-/simpleInterest: Integer

60s
• Q2

Identify the relationship shown in the picture below?

Aggregation

Realization

Composition

Dependency

60s
• Q3

A college first starts with a building. It then elects the professors and forms the departments. Initially a department may contain no student. Students will be allocated to one department atleast but cannot be allocated to more than 3 departments. Identify the cardinality between Department and Student.

Department:       1          and       Student:          1..*

Department:      1..3        and        Student:         *

Department:          *        and         Student:         1..*

Department:         *         and         Student:      *

60s
• Q4

What is the visibility of the method issueBook() of the class LibraryMember?

Private

Public

Package

Protected

60s
• Q5

Which one of the following UML Class diagrams most accurately models:

"A Person keeps animals as pets. An animal as a single person as its owner."

60s
• Q6

Which of the following is implied by class diagram?

Each key object has a link to many door objects.

Each door object has an attribute to store a reference to a key object.

Each key object has link to exactly one door object.

Each door object has links to many key objects.

60s
• Q7

Which of the following aspects is not a part of class diagram design?

attributes

operations

events and actions

60s
• Q8

Which one of the following terms is a measure of the number of links of an object with another object?

Cardinality

Coupling

Stereotype

60s
• Q9

Which of the following is implied by the class diagram given below?

A key opens up to 5 doors

A door is opened up to 5 keys

Many doors are opened by a key

Many keys open up to 5 doors

60s
• Q10

Which of the following is NOT implied by the class diagram given below?

A door is opened up to 5 keys

A key opens up to 5 doors

A door is opened up to 2 keys

Some keys open 2 doors

60s
• Q11

Which of the following is NOT implied by the class diagram given below?

Some teachers teach two courses

Each course is jointly taught by exactly two teachers

Some teachers may teach three courses

Some teachers may not teach any course

60s
• Q12

Consider the statement: "An employee is either a worker or a manager." Assuming that Employee and Manager to be two classes, what can be said about the relationship between these two classes?

Containment

Polymorphism

Association

Generalization-specialization

60s
• Q13

Which one of the following phrases indicates the relationship that exists between a class and its public parent class?

"...is implemented as a..."

"...is a..."

"...uses a..."

"...has a..."

60s
• Q14

Which one of the following sentences most closely describes "multiple inheritance"?

Two classes inherit from each other

A child class has both an "is a" and a "has a" relationship with its parent class

A base class has two or more derived classes

A child class has two or more parent classes

60s
• Q15

Which one of the following best characterizes the inheritance relation between two classes?

Polymorphism

Aggregation of information

Generalization and specialization.

It is the same as encapsulation.

60s

Teachers give this quiz to your class