Write an Age class. setAge stores the value, but only when it is zero or more — a negative value leaves the age unchanged. The constructor starts the age at 0, and getAge returns it.
class Age { Age(); void setAge(int value); int getAge(); }
Examples
There are also 3 hidden tests you can't see. Solve the problem, not the examples.