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.

Friday 6 February 2015

WEEK 5 - February 2nd - February 6th
TRACING RECURSIONS IMPRESSIONS
My experience with tracing recursion was quite interesting. Tracing recursive function was something very new which I was doing and therefore I enjoyed it. I think I misinterpreted it therefore lost marks on the quiz and even in the exam but I think we learn from our mistakes if I didn't made these mistakes I would not care about it and ignore it but making these mistakes helped me review recursion again and I learned it better than before. The easy method I learned was writing whatever the function is doing in english then translating it in python with recursive code which makes learning recursion easy. The same can be done while tracing recursions. The feeling of writing recursive code which works in the first go is out of the world for me because it is something which not everyone can do.