I'm trying to learn the concept of classes so I'm looking for a reason to use them but I find the whole concept might confusing. I can't yet see why I would use a class instead of just using a function. I don't understand why in classes you assign variables that are either public, protected or private, how does assigning a private or protected variable have any advantage over a regular public variable?
Thats besides the point though, I'm trying to figure out situations in which I would need to use classes so I can start practicing with them and implementing them into my code.