A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

11. When is a variable called extending access beyond visibility?
a. Passing a reference as an argument
b. Passing an argument by reference (which uses aliasing)
c. Returning a reference from a sub-program
d. All of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (d).All of the mentioned

12. What does Information Hiding mean?
a. The key technique for is to restrict access to program entities as much as possible
b. It is an expression that evaluates to an address where a value is stored
c. All of the mentioned
d. None of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (a).The key technique for is to restrict access to program entities as much as possible

13. Which of the following are the strategies for restricting access to program entities?
a. Limiting Visibility
b. Not Extending Access
c. All of the mentioned
d. None of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (d).None of the mentioned

14. What are the heuristics for information hiding?
a. Restrict the scope of declarations to the smallest possible program segment
b. Make class attributes at least protected and preferably private
c. Avoid global visibility
d. All of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (d).All of the mentioned

15. What are the heuristics for information hiding under don’t extend access?
a. Don’t pass or return references to class attributes—pass or return defensive copies instead.
b. Don’t pass parameters by reference
c. Don’t make aliases
d. All of the mentioned
View Answer Report Discuss Too Difficult!
Answer: (d).All of the mentioned

16. 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 Report Discuss Too Difficult!
Answer: (d).All of the mentioned

17. 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 Report Discuss Too Difficult!
Answer: (b).The operation name, the names and types of its parameters,and its return type

18. 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 Report Discuss Too Difficult!
Answer: (b).An algorithmic behavior description

19. 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 Report Discuss Too Difficult!
Answer: (d).All of the mentioned

20. 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 Report Discuss Too Difficult!
Answer: (c).All of the mentioned

Page 2 of 13