+ 1

Is oop same as. calling different functions?

31st Dec 2015, 3:25 PM
bharath
1 ответ
+ 2
not really, class encapsulates some attributes and functions together. for example you have a class Bird. this class has function fly and attribute color. you use this class as a bluepring to build different birds with different color and the ability fly. A different example would be MonthlyIncome. this class has 12 variables to store income for each month and a Sum method( function in C++) to calculate sum off all incomes in that year. you can use this class to create different objects for different years.
18th Jan 2016, 7:37 PM
milad zahedi
milad zahedi - avatar