Sunday, 15 February 2015

SUMMARY OF OBJECT ORIENTED PROGRAMMING CONCEPTS (OOP)

I can relate to this topic because of my previous experience with C++ which is also an object oriented programming language. We treat everything here to be objects be it variable or function. Everything is implemented with the breakdown into modules or smaller units. Class design follows the concept of OOP where the methods of the class are modules or smaller units of the larger unit that is the class Inheritance is also an implementation of object oriented programming. The problem I faced with OOP concepts was the breakdown between methods or modules which involved smart strategies and critical thinking as in thinking as everything is happening live and then implementing it through specific modules performing the required tasks. I solved this problem by using the idea given by professors of thinking of class as a noun and the methods as verbs and therefore it was easier to design a class. For example in Assignment 1 I used OOP concepts where choosing a move, taking a move or declaring a winner were various methods, in other words verbs of the specific class which were implemented specifically in subclasses. One great thing or let me call it strategy I learned was first describing the specific subclasses and then generalizing whatever is repeated in these specifications which makes it easier to use inheritance. The given diagram explains Inheritance, the subclasses bikes, cars, buses and trucks all have same features such all are road vehicles but they are different types of vehicles. They have some common features which are implemented in base class, some specific features which are specific to subclasses and are implemented differently in subclasses.  


 Object Oriented programming language is better than procedural programming because here the central concern is objects here we define objects first and then flesh them out with specific implementations whereas in procedural programming treats program as an recipe whereas objects are containers of the recipe. Some of the advantages of Object Oriented Language are given below


So the idea of Object Oriented Programming itself is the main tool or the building block of various high level programming languages like python.

No comments:

Post a Comment