Task
Implement class RandomInt using randomInt.cpp and randomInt.h.
For the RandomInt class:
- The function call operator is overloaded and will generate a random number each time the operator is used.
- Objects can be created with the lower and upper bound of the random number specified.
- Objects can also be created without the lower and upper bound of the random number specified. In this case, the upper and lower bound are taken as 1000 and 9999 respectively.
- The function operator of an object from the class is expected to generate a different succession of results every time the application is run.
Implement an application random_app.cpp which creates a RandomInt object R, and use it to generate 10 random numbers of 4 digits (1000 - 9999). It will then create another RandomInt object r, and use it to generate another 10 random numbers of 3 digits (100 - 999).
Your application should generate different sets of random numbers each time the application is run