add Car and Locomotive Java classes