Creating a contructor to RandomData class and changing access control to methods