7. Quiz Questions

If you would like to look up the answers for the following quiz questions, you can check our discussion forum. If you don't find an answer in the forum, you may create a post asking for an answer to a particular question.

If you would like to do interactive quizzes with online feedback and with the option to ask a coach, then you should enrol in the advanced online course (book parts 4-5) offered by our partner developer-competence.com.

7.1. Question 1: Statements about a Class Hierarchy

Consider the following class model:

Which of the following statements are true? Select one or more:

  1. ☐ All instances of Cde have a value for attribute a1.

  2. ☐ The standard identifier of Cde is a1.

  3. ☐ All instances of Cde may have an object reference ab referencing an object of type Bcd.

  4. ☐ Instances of Abc may have a value for c.

  5. ☐ For any object of type Abc the value of a3 must be greater than the value of a2.

  6. ☐ For any object of type Cde the value of a3 must be greater than the value of a2.

  7. ☐ The standard identifier of Cde is c.

7.2. Question 2: Class Hierarchy Merge

Consider the following class model:

In the case of such a simple class hierarchy, we can use the Class Hierarchy Merge design pattern where the entire class hierarchy is merged into a single class. Which of the following models describes the correct implementation of the Class Hierarchy Merge design pattern for the given Abc class hierarchy? Select one:

  1. O

  2. O

  3. O

  4. O

  5. O