Sunday, 12 January 2014

Week 1 - Classes and Objects


In the first week of lectures we learned about object-oriented programming and its advantages. We learned to appreciate that this style of programming can be used to meet real-world challenges more accurately and conveniently.

One important thing I realized while using this style of programming is that I very often tend to miss out important methods (or tasks) required to be included in a class. That is, I begin to think I am done before I am actually done.

I believe the key to avoiding this difficulty is to first think of the actual scenario of the object in the real-world. That is, we need to first jot down the tasks that the object may be required to do to achieve full functionality. We will also be have to be careful about deciding what to be and what not be included as arguments for the constructor. Once we are done with these, we are ready to start writing codes for making the class.

One thing I really enjoyed was making the Point and the Rational classes. I love Mathematics, so making such a class was really fun. I was actually being ahead of Dan while defining methods in the lecture! (However, I did miss out a method or two.)

Overall, the first week went well for me. Nothing seemed too complex, as long as I did the readings carefully.

However, it would have been more fun and interactive had clickers been used in the lectures in this course, like it was in CSC108. I believe that enriched my learning experience a lot!

No comments:

Post a Comment