Monday 20 April 2020

001 Learning OOP, Data Structure and Algo Approach

First understand what is OOP, whatever we see in physical word can be replicated in virtual world of coding.

Example Car, Tree, Person, Aeroplane

a. Every physical entity, we need to create it's blueprint, and which you call as Class in OOP b. Each Entity is born with a particular characteristic, which you call as Class Instantiation.

You can think of Tree as Class, which has a root, branches and leafs.

-> when you create it as class, you need to define it's ingredients, and their related data, and behavior of class.

Ingredients -> root, branch, leaf
data-> depth, number of branches, number of leaf
behavior -> add branch, remove branch, add leaf ....

You once you define such a class which can be used to solve problem in real world, and are reusable, may be utilized in data structures.

Stack, Queues, Lists are example of all such physical worlds entities which help us to solve a problem.

 Algo's are the way behaviors are understood and implemented for a data structure in OOP.






No comments:

Post a Comment