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