Friday, 30 January 2015

SLOG2: Impression of last few weeks

It has been several weeks since I started learning CSC148. In these lessons we were mainly taught something about class and methods of class, which shows the main idea of OOP. Though we just begin studying the meaning of OOP, I am impressed by it deeply, especially when I am working for the Assignment1.

Yesterday the Assignment was due and part go my work was done. In this assignment we were asked to use the idea of OOP to write a subtract square game that human can play with the computer opponent. Obviously in such a game there are various methods should be used, such as starting the game, changing the turn, and making the move. In order to write them specifically and use them integrally, we need to put them into different class to distinguish what features they have. While running them, we need to create instances for different class in the correct order so that they could show their own functions. That is how to think via OOP idea.

Besides, inheriting is also an important part. The inheriting between superclasses and subclasses and the overriding of methods make it possible for us to use one function to achieve different functions instead of defining excessive different functions. There is no doubt that such a feature is really efficient for a geek.

2 comments:

  1. Hah, I hope you find CSC148 interesting as well. Hope you get a good grade and ACE this course!

    ReplyDelete