In what way does our stack ADT implementations support: a. Encapsulation? b. Information hiding? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Resposta
+ 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