PrepAway - Latest Free Exam Questions & Answers

What is the purpose of polyinstantiation?

What is the purpose of polyinstantiation?

PrepAway - Latest Free Exam Questions & Answers

A.
To restrict lower-level subjects from accessing low-level information

B.
To make a copy of an object and modify the attributes of the second copy

C.
To create different objects that will react in different ways to the same input

D.
To create different objects that will take on inheritance attributes from their class

Explanation:
B: Instantiation is what happens when an object is created from a class. Polyinstantiation is when more than one object is made, and the other copy is modified to have different attributes. This can be done for several reasons. The example given in the chapter was a way to use polyinstantiation for security purposes, to ensure that a lower-level subject could not access an object at a higher level.

One Comment on “What is the purpose of polyinstantiation?

  1. joe says:

    Instantiation is what happens when an object is created from a class. Polyinstantiation is when more than one object is made, and the other copy is modified to have different attributes




    0



    0

Leave a Reply