Wednesday, 22 January 2014

Week 3: Object Oriented Programming

This week, the lecutres and labs were focused on object oriented programming. We worked on a Stack class mostly, and at this point I think I have a solid understanding of it. I know what a stack does, I know how to push and pop objects, and I know how to write simple method calls. The most difficult part was inheritance because I didn't quite understand how Stack and IntStack interacted. I was able to follow most of what was said in lecture, but I definitely need to review the examples on my own time.

Another thing I need to review is exceptions. I felt like we skimmed over the topic too quickly in lecture, and although we went through a couple of examples, there wasn't a lot of structure in terms of teaching us how to write an exception. With that said, my plan is to look over the class examples and make my own notes on how to write exceptions.

I really enjoyed the lab this week. My partners and I actually got through the entire thing within the allotted time (thank goodness), and the difficulty of the lab was just right. We struggled with finding a way to make the Queue class faster, though. We discussed it for a bit, but we weren't able to come up with anything. How can we preserve the indices' order so that it doesn't have to reset every time we add or remove something from the queue? I guess that's something I will have to think about for a while and possibly ask about later on.


No comments:

Post a Comment