Bake a cake in a 13×9 pan. Cool completely; then cut in half lengthways. Cut each half into three pieces.
Take one of those pieces and cut in half again. Place these two pieces on the side and the top of another piece to form the engine part of the cake. The remaining pieces will be the wagons.
Ice the engine with blue icing and ice the wagons with other bright colors.
Cover a tray with green-colored coconut to look like grass if you wish.
Put the engine and the wagons on the tray and put a few candies between each wagon to act as the couplings.
Stick round cookies to the sides of the train for wheels. Load the wagons with freight (candy). Decorate the sides of the train with candy or icing (for windows, numbers, doors, etc.) Finish off with sprinkles. Thread popcorn onto a thin wire to form smoke coming out of the engine.
I didn’t thread popcorn for smoke. Therefore the engine and first car could look like a tractor if you wanted, if you put the exhaust pipe on the side and used larger back wheels. (I used marshmallows for the train boiler.) You can decorate more with icing if that’s your style, instead of candy. I didn’t do coconut grass.
My train couldn’t all fit in a line on the tray, so I turned it. I also got tired of icing and decorating so many wagons, so I stacked two on top of each other to make it a passenger car, and used fruit chewy candy to make windows for it.
An easier way to explain the engine for those not mathematically challenged is (after cutting in half lengthways) cut one half in thirds, and cut the other half in half. One half will be the base of the engine. The other half cut just one third off. That will go on the edge of the engine base to make the engine driving area-thingy.