Visibility, Accessibility and Information Hiding - Software Design Question and Answers

1.

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

Answer: Option 'A'

The key technique for is to restrict access to program entities as much as possible

2.

What is a name and which of the following is true?

   A.) A name is an identifier bound to a program entity
   B.) Virtually every programming language will not supports variable and sub-programming
   C.) It is not be possible to refer to a particular entity by name at various points of a program’s text
   D.) None of the mentioned

Answer: Option 'A'

A name is an identifier bound to a program entity
 

3.

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

Answer: Option 'D'

All of the mentioned

4.

Which of the following are of non-local form ?

   A.) Private
   B.) Protected and Packaged
   C.) Public
   D.) Public, Protected and Packaged

Answer: Option 'D'

Public, Protected and Packaged

5.

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

Answer: Option 'D'

Making a variable accessible in a portion of a program where it is not visible is called extending access beyond visibility while Passing a reference as an argument, Passing an argument by reference (which uses aliasing), Returning a reference from a sub-program.

6.

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

Answer: Option 'D'

All of the mentioned

7.

What is reference?

   A.) It is an expression that evaluates to an address where a value is stored
   B.) It is a variable with the same address as another variable
   C.) All of the mentioned
   D.) None of the mentioned

Answer: Option 'A'

It is an expression that evaluates to an address where a value is stored

8.

When is a program accessible?

   A.) A program entity at a point in a program text if it can be used at that point
   B.) A variable is a programming language device for storing values
   C.) All of the mentioned
   D.) None of the mentioned

Answer: Option 'C'

All of the mentioned

9.

Which of the following represents PAID specification?

   A.) Component properties are documented in text
   B.) Operation specifications, which elaborate operation responsibilities and state operation interfaces
   C.) All of the mentioned
   D.) None of the mentioned

Answer: Option 'B'

Operation specifications, which elaborate operation responsibilities and state operation interfaces
 

10.

What are the types of visibility?

   A.) Local
   B.) Global
   C.) Non-Local
   D.) All of the mentioned

Answer: Option 'D'

All of the mentioned

11.

What is visibility?

   A.) A program entity at a point in a program text if it can be referred to by name at that point
   B.) The portion of a text over which a program entity is visible
   C.) All of the mentioned
   D.) None of the mentioned

Answer: Option 'B'

The portion of a text over which a program entity is visible

12.

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

Answer: Option 'D'

All of the mentioned

13.

Which of the following represents DeSCRIPTOR specification?

   A.) Program component decomposition and component relationships are shown in static models, such as class diagrams
   B.) Packaging and implementation specifications, particularly as they relate to information hiding
   C.) All of the mentioned
   D.) None of the mentioned

Answer: Option 'A'

Program component decomposition and component relationships are shown in static models, such as class diagrams
 

14.

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

Answer: Option 'D'

None of the mentioned


Visibility, Accessibility and Information Hiding Download Pdf

Recent Posts