+ 1
Is oop same as. calling different functions?
1 Réponse
+ 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.