Operation Specification - Software Design Questions and Answers

1.

Which of the following are class invariant heuristics?

   A.) Specify restrictions on attributes
   B.) Specify restrictions on parameters
   C.) Specify relationships between the parameters and the results
   D.) All of the mentioned

Answer: Option 'A'

Specify restrictions on attributes

2.

What is precondition?

   A.) It is an assertion that must be true at the initiation of an operation
   B.) It is an assertion that must be true upon completion of an operation
   C.) It is a statement that must be true at a designated point in a program
   D.) None of the mentioned

Answer: Option 'A'

It is an assertion that must be true at the initiation of an operation

3.

Declarative specifications are preferable for which of the following reasons?

   A.) Declarative specifications are more abstract because they ignore implementation details, and consequently they are more concise than procedural specifications
   B.) Declarative specifications focus on an operation’s interface, making it clearer how an operation interacts with its callers
   C.) Procedural specifications may bias programmers toward the implementation used in the specification
   D.) All of the mentioned

Answer: Option 'D'

All of the mentioned

4.

What is Signature?

   A.) The operation’s class (in object-oriented designs) or module (in non-object-oriented designs)
   B.) The operation name, the names and types of its parameters,and its return type
   C.) A sentence or two informally stating the operation’s responsibilities
   D.) A detailed description of the algorithm and data structures used to implement this operation

Answer: Option 'B'

The operation name, the names and types of its parameters,and its return type

5.

Which of the following are post condition heuristics?

   A.) Specify restrictions on parameters
   B.) Specify conditions that must have been established
   C.) Specify empty preconditions as true or none
   D.) None of the mentioned

Answer: Option 'D'

None of the mentioned

6.

What is true with respect to operation contract?

   A.) It is a binding agreement between two or more parties
   B.) They usually state each party’s rights and obligations
   C.) All of the mentioned
   D.) None of the mentioned

Answer: Option 'C'

All of the mentioned

7.

What is Class Invariant?

   A.) A class invariant is an assertion that must be true of any class instance between calls of its exported operations
   B.) Class invariants must be established by class constructors
   C.) Class invariants must be preserved by every exported operation in the class
   D.) All of the mentioned

Answer: Option 'D'

All of the mentioned

8.

Which of the following are class invariant heuristics?

   A.) Specify restrictions on attributes
   B.) Specify restrictions on parameters
   C.) Specify relationships between the parameters and the results
   D.) All of the mentioned

Answer: Option 'A'

Specify restrictions on attributes
 

9.

Which of the following is incorrect?

   A.) The postconditions express the caller’s obligations and the called operation’s rights
   B.) The preconditions express the caller’s rights and the called operation’s obligations
   C.) All of the mentioned
   D.) None of the mentioned

Answer: Option 'D'

None of the mentioned

10.

What is operation specification and what does it include?

   A.) Specification of an operation’s responsibilities and interface can be collected in one place, in structured
   B.) It includes Class or Module, Signatures, Descriptions
   C.) It includes Behavior, Implementation
   D.) All of the mentioned

Answer: Option 'D'

Specification of an operation’s responsibilities and interface can be collected in one place is called operation specification, and It includes Class or Module, Signatures, Descriptions, Behavior, Implementation.


Operation Specification Download Pdf

Recent Posts