Write a class called WholeNumber class. The whole numbers are the non-negative integers: 0,1,2, . . . Your class must handle addition, subtraction, and multiplication of whole numbers—no division or mixed-type (whole number and integer) operations need be handled. Your class must also handle printing—e.g., if x is an instance of the WholeNumber class, you must be able to write print x.
Two cases must not be allowed: (1) you must not be able to create a WholeNumber that has a negative value; (2) an arithmetic operation cannot be allowed to have a negative result. In both cases, an error message must be printed.
Remember that arithmetic must return a whole number. That is, if x and y are whole numbers, the result of x + y must be a whole number.
Include sample code that uses your class and demonstrates the use of all methods as well as error handling.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.