>i was wondering how much i should use classes in C++.
As often as you need them, obviously. In my experience, this question is born of ignorance. You don't understand OOP and classes well enough to know when to use them, so you try to turn it into some kind of nonsensical numbers game. It's not that simple, unfortunately.
Just try to figure out the concepts behind a feature and eventually you'll learn when and where it's best used.
>Should i use it as much as possible?
-Restricting access to encapsulated data/ standing in for the same type (Proxy)
-Abstractions for future data (Strategy, Bridge)
-Adding functionality to existing objects with the same interface (Decorator)
-Adapting an object to the interface of another (Adapter)
-Providing a commonality for iterating through a collection of objects (Iterator)
-Granting transparency between using one object, or many of the same type (Composite)
and so on in terms of patterns--
The Client/Programmer perspective:
-Easy to relate ideas into programmable objects.
-Easy (or easier) to identify problems in existing code when classes are used for job delegation.
the list goes on, but these are some advantages to name a select few #_#
>for misunderstanding the concepts of classes
That's hardly cause for an apology.
>is it really only to reuse code?
Classes are an organizational tool, nothing more. There are many, many ways you can use that tool to achieve many, many results, but at the core classes are just another way of structuring your code.
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...