A boxcab, in railroad terminology, is a locomotive in which the machinery and crew areas are enclosed in a box-like superstructure (from boxcar). It is a term mostly used in North America while in Victoria (Australia), such locomotives have been nicknamed "butterboxes" (Victorian Railways second series "E" Class electric locomotives numbered E1102 to E1111). Boxcabs may use any source of power but most are diesel or electric locomotives. Few steam locomotives are so described but the British SR Leader class was a possible exception. Most American boxcabs date from before World War II, when the earliest boxcabs were often termed "oil-electrics" to avoid the use of the German name "Diesel".
Boxcabs do not have heavily styled ends, or a superstructure consisting of multiple boxy structures, although the prototype diesel/oil-electric, GE #8835, had one prominently-rounded nose (from its trolley (tram) car ancestry) and the second and following 100-ton ALCO boxcabs had semi-cylindrical ends.
The construction of double ended (and a small number of single ended) boxcab diesel locomotives was common in Australia from 1969 until the 1980s. These were mainly GM-EMD derivatives built by Clyde Engineering with a smaller number of Alco derivatives built by A. E. Goodwin/Commonwealth Engineering and GE derivatives by A. Goninan & Co/UGL Rail.