Friday, January 24, 2014

Week 3 - Object-Oriented Programming

Object-Oriented Programming

Python is a programming language that supports object-oriented programming, a coding method which allows the user to simulate the way objects interact in the real world in their code. This method is advantageous in that it can help to clearly write and understand the code used in complex programs. The concept of this method is to create objects that mirror those that exist in reality, and then give them suitable functions to create a program.


From my perspective, the concept of object-oriented programming is an effective way of simplifying programs. Having an object handle a group of tasks like it normally would in the real world makes it much easier for both the writer and future readers of the code to understand how the program works. They could relate the objects and their functions to those of their reality counterparts. I find this concept very interesting, mainly because the way objects model the real-world helps me when planning the code for a program I need to write. Instead of thinking What steps do I need to take to get the desired result? I can now think in terms of What objects are part of the program that I need to write and what do they need to do? This is much more similar to the way I would approach a problem in real life and therefore I find it easier to approach the problem and reach a solution. However, sometimes I find that it's not very clear what those objects should be, or—if two objects are quite similar—which function belongs to which object. I suppose this would require more experience or more careful observation of the way these objects need to interact in order to reach the program requirements.

- Shuqiao Wang

No comments:

Post a Comment