Logical View  «Prev  Next»

Modeling Operations - Quiz

Each question is worth one point. Select the best answer or answers for each question.
 
1. Compute the area of a square using the height and width. Allow no more than two digits of precision on the input. The answer should have no more than two digits of precision as well. Choose the operation notation that most accurately describes the stated requirement.
Please select the best answer.
  A. Area ( height : numeric , width : numeric ) : numeric { 2 decimals maximum }
  B. Area (width : numeric { 0 to 2 decimals } , height : numeric { 0 to 2 decimals } ) : numeric { 0 to 2 decimals }
  C. Area ( height : 2 decimals = 0 , width : 2 decimals = 0 ) : area : 2 decimals
  D. Area ( width : numeric { 0 to 2 decimals } , height : { 0 to 2 decimals } ) area : { 0 to 2 decimals }

2. Determine a person's initials from their name. Choose the operation notation that most accurately describes the stated requirement.
Please select the best answer.
  A. GetInitials ( firstname : character , middlename : character , lastname : character ) : character
  B. GetInitials ( name : character ) : initials { the first letter of each name }
  C. GetInitials ( name : character { 1 to 60 characters } ) : character
  D. GetInitials (firstname : first letter , middlename : first letter , lastname : first letter ) : character { 1 to 3 characters }

3. Define an operation to locate a customer's address using the customer's unique identifier that is always an integer. Choose the operation notation that most accurately describes the stated requirement.
Please select the best answer.
  A. GetCustomerAddress ( customerid : integer ) : Address
  B. GetCustomerAddress ( customerid : integer ) : character { 2 lines of street address, city, state and zipcode }
  C. GetCustomerAddress ( customerid : unique integer ) : Address
  D. GetCustomerAddress ( customerid : unique ) : character { 2 lines of street address, city, state and zipcode }

Correct answers:

Your Score: 0