Confusion about classes and program design

I read that classes something like custom "data types" in a sense with their own functions.

Examples that I've read usually revolve around an obvious object, like a button. If my program has two parts, one to read and then process data and the second to store it, I understand why the storage part could be taken out and made into a class with its own functions.

But would it be alright to make the processing part a class too? It would be almost one big function only and does not need to store data, merely pass it onto the class in the second part.

Would the design of the program be considered better to leave the processing in the main.cpp or to remove as much code as possible and place them in classes?
Would the design of the program be considered better to leave the processing in the main.cpp or to remove as much code as possible and place them in classes?
no, the only functions that you should put in your class is something that is related to it.. for example you're class represents a car, you would probably want a function like turnleft() or turnright() or break() but not fly() or firegun().

~hope that helps
Well for the most part you are correct, breaking things up into it's respective parts is the best for class design, however looking at the advantage of classes and their uses for heiarchy, it's very rarely classes like these can have subclasses, or children. C being a functional or procedural language very simple programs like this can easily just take on a procedural like construct.
What I mean to say is, practising breaking up problems into it's perspective "classes" is probably the way to go, however if your just writing a simple program for personal use and don't feel the need to practise this method then using a procedural structure is fine also.
Really it all depends on your needs, if your doing this as homework, then breaking up into classes to show you can is probably a good idea.
In that case I would break it up as much as possible to show you understand the philosophy.
I'm doing this for homework, haha. Thanks for the replies. It helped clear up a lot of things
Topic archived. No new replies allowed.