In what way does our stack ADT implementations support: a. Encapsulation? b. Information hiding? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 3

In what way does our stack ADT implementations support: a. Encapsulation? b. Information hiding?

In what way does our stack ADT implementations support: a. Encapsulation? b. Information hiding?

28th Aug 2019, 9:42 AM
Zhenis Otarbay
Zhenis Otarbay - avatar
1 Réponse
+ 2
a) you can only access the stacks top element throw a function. (the stack sort of does it's own thing and you just ask it to do sth) b) when you encapsulate the information is hidden, and can only be accessed throw functions, limiting the access
28th Aug 2019, 11:12 AM
Anton Böhler
Anton Böhler - avatar