Sunday, March 1, 2015

the first few weeks...

It's been a while since the last blog post for the sLOG, so it's about time to get into some topics.

In the first few weeks of the course, which is roughly up to the end of Week 3, there has been a lot of focus on classes and subclasses. Classes are not an unique concept to CSC148H (Introduction to Computer Science) as they were introduced in the CSC108H (Introduction to Computer Programming). Admittedly, my grasp on the subject was not comfortable and it was confusing at first. Eventually, working on the lab exercises, and Assignment 1's focus on classes and subclasses, I am more comfortable with the classes and subclasses, and the usefulness of them in designing programs such as a series of games.

These classes and subclasses help introduce new ways to think. Ways how to write generic code to help create a specific program, and later down the road, to improve upon the program. For instance, Assignment 1 had you create generic code for a game state, and specific code for a subtract square state. You might get some ideas on what you could do with the generic code. For example, in the Strategy class, we have a method to randomly pick a number from an user-defined range. You start to think about what else you could use that method with. For instance, could we use it to randomly shuffle a deck somehow? Could we use it for the children's card game, War? There are possibilities, both easy and difficult to implement.

Ultimately, the first three weeks were, in a way, a continuation of CSC108H picking off where it ended. However, the end of the third week started to hint about a topic called recursion. We'll talk more about that later.

No comments:

Post a Comment