Buildings of the third grade are apartments. An apartment is any building or portion thereof which is occupied, in whole or in part, as the home or residence of three or more families living independently of each other and doing their cooking upon the premises, and includes apartment houses, flat houses, tenements, flats and all other houses so occupied. A dwelling house occupied as the home or residence of fewer than three families shall be deemed to be a tenement house and shall be subject to the provisions herein under any of the following conditions:
(a) It is built in connected rows or terraces; or
(b) The water supply, water closets and privies are used in common.
(1974 Code § 155.05)