Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1)Identify the method and the feature of the methods that that encapsulate a str

ID: 3585099 • Letter: 1

Question

1)Identify the method and the feature of the methods that that encapsulate a structure.

__________________________________________________________________

2)Of the three array-based structures we studied, which one performs the fastest:

a)Insert operation? _________________ b) Fetch operation? __________________

3)Give the two “tricks” that make the speed of the Unsorted-Optimized structure fast,

____________________________        ________________________________

      and explain why can’t they be used to speed up the Sorted structure.

     _________________________________________________________________

4)If a node is stored at location 100 in an encapsulated structure, when it is fetched is 100 returned to the client code?

__________________________________________________________________

5) Give the density of an array based structure that stores 1,000 nodes if they are:

a)10 bytes wide. __________________________________________

b)20 bytes wide _____________________________________

6)Describe the garbage collection method for the Sorted array-based structure.

________________________________________________________________

Explanation / Answer

1)Identify the method and the feature of the methods that that encapsulate a structure.

Answer: Encapsulation: Encapsulation hide the data and the member function. the feature of this encapsualte the structure.