Sunday, February 2, 2014

Inheritance

Can you believe that there are only 8 weeks until the semester ends? In the last week's lectures, we have been introduced a concept called 'Inheritance'. Inheritance is used to indicate that one class will get most or all of its features from a parent class. Another way to do the exact same thing is to define another class and modules. There are three ways that parent class and child class interacts: (1). Actions on the child imply an action on the parent; (2). Actions on the child override the action on the parent; (3). Actions on the child alter the action on the patent. In the lab of last week, we mainly practiced on how to apply the first two interactions. Also, we wrote some test code by using the unit test mode. During the lectures, a new concept called "Turtle" was introduced. I have not fully understand this whole new thing yet, and definite need to work on it more. After all, happy Chinese New Year to everyone, and wish you all the best!

No comments:

Post a Comment