A10.1-R4: INTRODUCTION TO OBJECT ORIENTED PROGRAMMING THROUGH JAVA.
Assignment 23
The direction control for some of the first toy electric trains was accomplished by
interrupting the power to the train. Prepare state diagrams for the headlight and wheels of
the train, corresponding to the following scenario:
Power is off, train is not moving.
Power is turned on, train moves forward and train headlight shines.
Power in turned off, train stops and headlight goes out.
