During this week I learned about the stack class, which is like a list. When you add an item to a stack, it is added to the end of a it, When you remove an item from a stack, the item at the end it taken out. It's a really simple class. It includes __init__, __eq__, __str__, remove and add methods.
During the lab, we focused on stacks. We had to create a queue class. A queue is slightly different from a stack, when it has to remove an item it instead removes it from the beginning of the queue. We also had to create unittests for both the stack and queue class. I find unittest complicated and confusing for me, so I'm going to review the topic this weekend.
During the lab, we focused on stacks. We had to create a queue class. A queue is slightly different from a stack, when it has to remove an item it instead removes it from the beginning of the queue. We also had to create unittests for both the stack and queue class. I find unittest complicated and confusing for me, so I'm going to review the topic this weekend.
No comments:
Post a Comment