Object Oriented Program (OOP) is a programming paradigm that focuses on object that is associated with one or more methods. The methods of the object usually reflect on how we treat the object in real world. They start with an initializer that uses the method __init__. All the methods of the object uses (self : 'object') as one of their arguments. This enables us to call the method of the object by 'object'.method(), instead of method('object').
I found out that this topic is interesting because it enables you to create objects that can interact with each other. For, example, in the exercise 1 for week 2, I have to make Dog and Toy objects such that the Dog can play with the Toy. It is really somehow, interactive I would say. The biggest challenge I faced is the concept of OOP itself. At the first practical, I was blur and didn't know what to do. Luckily, the assigned reading and my temporary partner (because I went to the wrong practical room), Matthew helped me a lot with the basic fundamental idea of OOP. Now I realized that the assigned reading is very helpful and essential for any new materials given, so I should be reading it for the upcoming topic which is recursion.
No comments:
Post a Comment