There were (as on the Queen Mary) usually 3 classes on ocean liners -
Steerage was really for immigrants and was unusually luxurious on the Queen Mary. It was often in the bow or near the crew quarters or over the engines. Passengers were not allowed out of their own sections regardless of where they were (except on the maiden voyage when the whole ship was open to all).The sizes of cabins were obviously different. Most ships today do not have different sections for different classes.
Thanks to Julian Hill, master of
The Queen Mary Enthusiasts' Page: http://www.queenmary.org