Define a Class for a type called CounterType

Honestly guys, I have no idea how to even start this program. Or really write it, since I don't even know where to start. If someone could please help me with this, I would greatly appreciate it. This is for a beginning CompSci course at my school. Here is the program description:



Define a class for a type called CounterType. An object of this type is used
to count things, so it records a count that is a non-negative whole number.

Include a mutator function that sets the counter to a count given as an
argument. Include member functions to increase the count by one and to
decrease the count by one.

Be sure that no member function allows the value of the counter to become
negative.

Also, include a member function that returns the current count value and
one that outputs the count. Embed your class definition in a test program
and run sufficient tests to verify it all works correctly.
Please don't post the same question multiple times.
http://www.cplusplus.com/forum/general/130698/
Define a class for a type called CounterType.
Are you sure you can't even start this?
I'll be honest, I'm too busy evaluating triple integrals, analyzing line integrals, calculating three dimensional density functions, and getting research papers published to have to deal with my beginners comp sci class, when it's just a gen ed. I was hoping, since it's so easy, someone could type it up for me in no time
Last edited on
Topic archived. No new replies allowed.