Monday, 27 March 2017

Core Java Assignment 23


Core Java Assignment 23


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.
Power is turned on, headlight shines and train does not move.
Power is turned off, headlight goes out.
Power is turned on, train runs backward with its headlight shining.
Power is turned off, train stops and headlight goes out.
Power is turned on, headlight shines and train does not move.
Power is turned off, headlight goes out.
Power is turned on, train runs forward with its headlight shining

No comments:

Post a Comment