One of Starfleet's major concerns in terms of its personnel is crew comfort. The vast distances of space and immense responsibilities asked of a ship's crew require that they have a fitting place to retreat to for rest and relaxation. The amount of living space allotted to a crewman is between 110 and 120 square meters on large explorers and space stations. The amount and quality is relative, of course, to the size and type of vessel in question. It has always been the goal of ship designers to allow each crewman and assigned personnel their own quarters, but this is usually not feasible. Typically lower-rank crew are required to share quarters (2 to a room), especially on smaller escorts and frigates. On the Hornet class, for example, space is such a premium that crew have to "hot-bunk" (use the same beds on alternating shifts) but this is a rarity.
"Typical" crew accommodations on medium to large vessels include a living area, a bedroom, and a bathroom. Likewise, each quarters usually has a replicator, sonic and/or normal showers, computer console, personal holographic viewers, null-grav sleeping chambers, and provisions for pets. (Star Trek The Next Generation Technical Manual). Certain quarters can also be adapted to Class H, K, L, N, and N(2) environments for species requiring those settings.
Officer's Quarters are, as expected, often more lavishly decorated and furnished than other contemporary Crew Quarters. This often includes the addition of artwork, plants, large and more comfortable furniture, and the like. Whether or not they are bigger in terms of size and volume depends on the class of ship (explorers typically have larger quarters; escorts, much smaller), the shipyard's interior design plans, and the amount of unused volume when everything else has been installed. For the most part officer quarters are slightly bigger, whether by design or necessity. Included are an enlarged living room/work area, a bedroom, a fully equipped head, a dining table, and a large desk. These quarters also have large-screen LCARS displays and the "usual" amenities such as a replicator, personal holographic viewers, null-grav sleeping chambers, and provisions for pets.
Smaller ships generally do away with the separate rooms and combine the bunking area with a small work/living area. Bathrooms are shared with up to three other crewman in such situations. Here is an example from the Defiant class.
Not all crew quarters can be called comfortable. Klingon vessels are notorious for their crowded, spartan living areas, giving credence to the Klingon belief that comfort is not a concern of a true warrior and wasted on the dead.
CO / XO / VIP Quarters
Excluding family suites, these are the largest of the quarters aboard ship. Typically reserved for the CO and XO, several extra units are provided for visiting flag officers and dignitaries.
Junior Officers Quarters
Junior officers(Lt j.g. & Ens), Warrants, and NCO's (Chief Petty Officer & above) are expected to share quarters, typically with another officer of the same rank. They have separate bedrooms but share the same living area and head. Officers that have spent more than six months in a berthing are allowed to request redecorating or remodeling of their quarters.
Officers with families are normally assigned a suite or in certain situations single quarters can be combined into larger ones by reconfiguring walls and bulkheads. Room configuration can, dependent on the class of ship, permit family suites to have upwards of four bedrooms, several bathrooms and dedicated living & dining areas as well as an optional office. Bedroom configurations can range from a single two person bed, to dual-single beds in side-by-side or top-and-bottom(bunk) configuration, to a four person dual-bunk, as well as a nursery for infants.