Monday, 14 October 2013

Object-Oriented Programming

This post is on object -oriented programming. The previously learned way of program invloving procedures or functions is called procedural programming.Object-oriented programming is a way of programming that is centred on creating objects. All objects have data inside them called attributes and procedures of functions called methods. A class is a collection of objects with similar attributes and fuctions. In Python, an objects attributes and methods are specified by a class. Therefore, a class can also be seen as  a model or blue-print for creating that object.

Object-oriented is more efficient than procedural programming. It makes it easier to add or modify functions by simply storing them in a class(instead of having to rewrite all your code!)

P.Jiggly

No comments:

Post a Comment