Sunday, February 15, 2015

A month and a half, OOP.

It's been a month and a half since this term started and, really, university life moves fast. The past week we've been talking about the green good stuff. Yes, I'm talking about the ADT Trees. At this moment, I still can't wrap my ahead around how the tree looks like in actual data(lists), instead of the visualization of a tree, with nodes and leafs. I hope I will figure this out during lecture.

Now, time for some more good stuff, Object Orientated Programming. Back in CSC108 and even back in high school, Most of the stuff I did that was mostly with lines of code to make a 'program'. For example, functions or having an entire program in the __main__. The one time I had some experience with OOP was when we used visual basic, since literally, everything was an 'object'. As well, in 108, most of the course was around building functions with the final 2 - 3 weeks being about classes and methods. As I said in one of my earlier posts, I said that we never went that in-depth into classes in 108, then suddenly in 148, CLASSES, SUBCLASS. It was definitely a good thing since having a whole program in __main__ would make debugging and understanding a nightmare. We've learn to initialize and create a class properly and in the most wrong-est way possible. We learnt what a method is, in general, a function that is within a class. Some methods are a bit hard to create depending on the class (ex. repr and str). We learnt about inheritance with classes, as in subclasses, then there's subclasses of subclasses. I mean we did have an entire assignment based on subclasses. Other than that, it's been ADTs throughout the weeks that have past.

No comments:

Post a Comment