+ 1
Why We uses classes instead of simple programming in python or c++
Why we need us classes in programming
1 Answer
+ 2
Classes allow us to combine data and functionality. For example a string can have a length method that returns the length. It's better to write
str.length()
than
length(str)
because the length method belongs to the string data type.
You don't need classes but they can be useful for many data types.