I bought a thermometer from Cole-Parmer having kerosene as the fluid, and the fluid is broken up. The fluid in the bottom part goes up to about 10 °C even though it is 20 °C in the room, then there is a gap followed by fluid between 23 °C and 25 °C, then there is no fluid going all the way to the top where there is another small stretch of fluid. There is a short black rubber sleeve on the top of thermometer.

Does this mean the thermometer is defective or am I using it incorrectly, not “calibrating” it or something?


Question: should I declare my object global or static?
Answer: It depends. If the part of your program that works with RNG consists of and will likely consist of (hard to see the future though) just those three functions, and those functions only need to work on one object - always the same, all the time-, then why not making that object global. 

Avoid restricting a type to only have one instance (Singleton pattern) unless that is an inherent characteristic of that type. If your program uses only one instance of RNG, then your program will just create one instance (i.e., make the object global, or constrain your program - not the type - to only create one instance). I can very well imagine that other libraries or programs may create several random generators.

Of course, if one day those functions will have to work on several different instances of RNG (although one at a time), then you will need to let them take an instance of that class as a function argument, and let them work on that argument. Clients will have to take care of providing the appropriate instance of RNG as an argument to those functions.

Then, if one day you will realize that those functions will also end up all working on other object types, and those data are somehow related to each other, you could consider wrapping them in a data structure or in a class, possibly making your functions member functions of that class - if the operation it carries out is fundamental for that type.

Giving guidelines in general without knowing what you have in mind, and what kind of application or library you are going to write, is not easy. Hopefully this helped a bit.