7. Quiz Questions

7.1. Question 1: Where to check constraints

Where in the application code should the constraints be checked? In the ...

☐ controller code

☐ model classes

☐ user interface code

☐ underlying DBMS (if it supports constraint validation)

7.2. Question 2: Where to define constraints

Where in the application code should the constraints be defined? In the ...

☐ controller code

☐ model classes

☐ user interface HTML5 code

☐ user interface JavaScript code

7.3. Question 3: Counting constraints

How many constraints are specified by the class model shown in the diagram? Select one:

O 7 O 8 O 9 O 10

7.4. Question 4: Constraint names

Which of the following constraints are specified by the class model?

☐ A range constraint for the property name.

☐ A uniqueness constraint for the property name.

☐ A referential integrity constraint for the property name.

☐ A uniqueness constraint for the property age.

☐ A mandatory value constraint for the property name.

☐ A mandatory value constraint for the property age.

7.5. Question 5: Compliant objects

Which of the following objects do not represent admissible instances (or, in other words, violate a constraint) of the object type Person?

{name: 21, age: 8}

{name: "21", age: 0}

{name: "Susan"}

{name: "Peter", age: 121}