static const int static const int class random publicexplicit randomint initialvalue )int randomint)double random )int randomintint lowint high )privateint state}/*construct with initialvalue for the state *random::randomint initialvalue ifinitialvalue initialvalue +mstate initialvalueifstate = state /*return pseudorandom intand change the internal state does not work correctly correct implementation is in figure *int random::randomintreturn state state /*return pseudorandom double in the open range and change the internal state *double random::random return static_castrandomintmfigure random-number generator that does not work