This set of Software Design Multiple Choice Questions & Answers (MCQs) focuses on “Operation Specification”.
1. 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
View Answer
Explanation: 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.
2. 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
View Answer
Explanation: A signature is operation name, the names and types of its parameters, and its return type.
3. What is procedural specification?
a) A behavior description that does not use an algorithm
b) An algorithmic behavior description
c) All of the mentioned
d) None of the mentioned
View Answer
Explanation: A behavior description that does not use an algorithm is called a declarative specification and algorithmic behavior description is called a procedural specification.
4. 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
View Answer
Explanation: Declarative specifications are preferable because of all of the mentioned reasons.
5. 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
View Answer
Explanation: All the mentioned statements are true with respect to operation contract.
6. 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
View Answer
Explanation: A precondition is an assertion that must be true at the initiation of an operation and A post condition is an assertion that must be true upon completion of an operation.
7. 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
View Answer
Explanation: The preconditions express the caller’s obligations and the called operation’s rights and The postconditions express the caller’s rights and the called operation’s obligations.
8. 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
View Answer
Explanation: All of the mentioned depicts class invariant.
9. 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
View Answer
Explanation: All of the mentioned are precondition heuristics.
10. 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
View Answer
Explanation: Class invariant heuristics-Specify restrictions on attributes and Specify relationships among attributes.
Sanfoundry Global Education & Learning Series – Software Architecture and Design.
- Get Free Certificate of Merit in Software Architecture and Design
- Participate in Software Architecture and Design Certification Contest
- Become a Top Ranker in Software Architecture and Design
- Take Software Architecture and Design Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Apply for Computer Science Internship
- Practice MCA MCQs
- Buy MCA Books
- Apply for Software Architecture and Design Internship
- Practice Computer Science MCQs