Number Class with Methods defined Inside it
Learn to implement a class with member methods defined inside it.
We'll cover the following...
Challenge
Write a self-sufficient class called Number
that maintains an int
member variable. It should have the following methods inside it to perform various operations on the int
:
-
void setNumber ( int n )
stores the value ofn
in the class’ ...