Tuesday, February 3, 2015

Week 1-3: ADTs, Stack, and Subclasses

The first few weeks of CSC148 have come and gone, and already we have covered ADTs, Stacks, and Subclasses. Assignment 1, was due Thursday, January 29 and in it I had to implement the concepts (particularly the concept of Inheritance and Subclasses) learned in class. I learned how to raise an Implementation Error and how to create Stacks. I also learned that about how to create a Subclass and what it means for the subclass to inherit attributes of the class.

It was difficult to implement the concepts learned in class. A stack in particular is something I had trouble understanding at first. However after reviewing the material, I am now confident in the material. One achievement for this week is my completion of the Assignment 1. As mentioned earlier, in Assignment 1 I had to implement the concept of Inheritance and Subclasses. I didn't find that particularly difficult. However reading the objective of the Assignment and figuring a way to complete it was difficult. I found it hard to begin and trouble understanding how the game would play, but after a good night's rest, I realized that the game would play by using the code: "if __name__ == '__main__'. Once I realized this, it was only a matter of coding the actual game.

I understood the way to go about programming the code, however, I did run across a few bugs. I was unable to actually get the game to run smoothly with no errors, probably because of the helper function I created to keep track of the legal moves was not working for all cases. However, despite the setback and failure, I did learn a lot through this assignment. Unlike the previous computer science course I took last year (CSC108), where the professors made the assignments as easy as possible, and told you what functions to complete and how to go about completing them, this was quite harder. The handout did not say what functions to write or how to write the subclasses. It was difficult getting started, especially since it seems like an overwhelming and difficult task. Once I got started, however, it wasn't as hard a task as I expected it to be.

No comments:

Post a Comment