Sunday, February 1, 2015

Week 4: Review and Question

In these four weeks, I have expanded what  I have learned about how to write class from CSC108. That's to say, I should know how to apply what I have know about writing class to solve real problems in our live. As what our assignment 1 required us to do,  what we should do is to design several classes to run a game or several different games in the future. These classes contained both main class and subclass. To design these classes well, it's important to know relationship between main class and sub class and also have clear comprehension of what subclass inherits from main class and what should it do with its own work.

However, when I worked with my partners, at the beginning of our assignment, we both misunderstood the main purpose of our assignment. Because what the instruction told us was to design five specific classes to finish whole construction of subtract-square game, whereas we thought we can finish this game by exactly one class and ignored the importance of subclass and continuity of our assignment. Fortunately, I've asked Diane and she gave us a comprehensive understanding of this assignment. What I and my partners should pay high attention to is to read our instruction of assignment carefully so that we could avoid unwanted and stupid mistakes.


Since the first midterm is coming, I should make careful review of what I have learnt from the lectures and mistakes of this assignment. And I also have a question about subclass. For the property of subclass itself, should it write as name of subclass itself or inherit from main class?(e.g., In __init__ of subclass, can it be written like '(Employee) -> Nonetype' or '(HourlyEmplyee) -> Nonetype' ?)

No comments:

Post a Comment