Modeling Attribute Notations - Quiz Explanation

The answers you selected are indicated below, along with text that explains the correct answers.
 
1. A customer's name is made up of a first, middle, and last name totaling 60 characters, 20 for each part of the name. Choose the attribute notation that most accurately describes this stated requirement.
Please select the best answer.
  A. Name : character = default
  B. FirstMiddleLastName : character = no default { 1 to 60 characters }
  C. FirstName : character = no default { 1 to 20 characters } ; MiddleName : character = no default { 1 to 20 characters } ; LastName : character = no default { 1 to 20 characters }
  D. Fullname : 60 character { 1 to 20 characters for each part of the name }
  The correct answer is C.
FirstName : character = no default { 1 to 20 characters } ; MiddleName : character = no default { 1 to 20 characters } ; LastName : character = no default { 1 to 20 characters }. It includes three separate attributes, each with their own correct specification. A, B, and D are incorrect because they do not have the required three separate attributes. However, B does include the correct number of characters and uses the proper notation to do so. D does not use the data type notation correctly because it includes the number of characters.

2. An order number is an eight-digit unique value. Choose the attribute notation that most accurately describes this stated requirement.
Please select the best answer.
  A. OrderNumber : numeric = 0
  B. OrderNumber : numeric = no default { system assigned and unique }
  C. OrderNumber : unique number = system generated number
  D. OrderNumber : numeric = no default { unique, 8 digits }
  The correct answer is D.
OrderNumber : numeric = no default { unique, 8 digits }. A is incorrect because it does not include the requirements for length or uniqueness. B is incorrect because it does not include the number of digits and adds the idea that the number is system generated when the requirement does not specify this. C is incorrect because it uses the data type element to specify uniqueness when it should be specified in the constraints.

3. Customer names may be people or companies. We allow only a single 40-character field for name, and it has to allow for punctuation that appears in some company names. Choose the attribute notation that most accurately describes this stated requirement.
Please select the best answer.
  A. Name : character { allow special characters }
  B. Name : alphabetic and special characters { no more than 40 characters including spaces }
  C. Name : character { alphabetic, spaces, and punctuation }
  D. Name : character { alphabetic, spaces, and punctuation ; up to 40 characters }
  The correct answer is D.
Name : character { alphabetic, spaces, and punctuation ; up to 40 characters }. It uses the constraints to specify everything that limits the kind and size of character data that is allowed the name field. A is incorrect because it is too ambiguous, allowing any type of special character. B could be correct at a very high level, but it would allow special characters other than punctuation. C is correct except that it leaves out the field length limitation.


UML Distilled