Monday, February 15, 2016

Week #4 (My thoughts on this week)

For this week's classes, we learned mostly about stack classes and how to use it. A stack refers to any object that stores information; such as lists, dictionaries and tuples. However, when working with stacks, we are only allowed to code it using three general methods: .add(), .remove(), and .isempty(). The reason for this is that we try to prevent the user from worrying about what type of object the stack is; hence, he/she can focus on simply typing the code out. I found it hard to understand this concept in class because my professor kept referring to the stack as a list, which influenced me to code the stack by referring to list methods and creating instances of a list. I fully understood it once my tutorial supervisor explained the whole concepts of stacks step by step to me.

No comments:

Post a Comment