Friday, 27 February 2015

Week 4: Yet Another Week

This is the fourth week of CSC148 and I feel relatively confident about the course material that we have been doing. I found that reading the course notes about inheritance and ADT very easy as it mostly required just reading the material and understanding the concepts of data representing and removing excessive code.

For inheritance, I found a really good example on David Liu's website (http://www.cs.toronto.edu/~liudavid/csc148/week2/inheritance.html) that allowed me to understand the material really well. Basically, I didn't understand how to carry over methods over to another subclass. However, this example on the webpage shed light on my confusion.

To use inheritance, I noticed that you have to include the parent class name,"House", in the declaration of the subclass. Also to carry over information of methods in from parent classes, I would simply write the parent class method preceded by the Parent class name(refer to line 3 in screen shot).

ADT was very easy to understand as it only required me to do a thorough reading of the course notes posted on the website.

No comments:

Post a Comment