Stepan's CSC148 SLOG

___________________Stepan's CSC148 SLOG

Sunday, 26 January 2014

Object-Oriented Programming

Object-Oriented Programming is the defining feature of Python as a programming language. Objects are used to create variables which can then be used for basic operations or something more complex like writing functions to perform specific tasks. Python offers the user some basic built-in data types (int, bool, str.. etc.) which are all considered objects. These objects have their own defining features. Different objects are used to store different types of data allowing the user to perform certain operations on them. The types of operations that can be used with an object are defined by the methods associated with that type of object. A class is a special type of object that allows the user to define the features of that type of object. It can be conceptualized as a blueprint for a user defined object. When creating a new class, the user will generally have to write the "initializer" method (__init__) that will be called when a variable of the object type defined by the class is created. There are some generally useful methods to write in any class (__str__, __eq__, __repr__). However, the ability to design a class gives the user the freedom to write their methods that can then be called on variables of that class to perform certain functions. With this freedom, Python becomes a language that can be designed by the user depending on the task at hand.

first entry (Welcome!)

Hello and welcome to my SLOG. From now on I will be posting reflections on the progress I make in CSC148. I hope you enjoy your stay and feel free to comment on any entries I make.