Monday 27 March 2017

Core Java Assignment 24

Core Java Assignment 24

A10.1-R4: INTRODUCTION TO OBJECT ORIENTED PROGRAMMING THROUGH JAVA.

Assignment 24



A simple digital watch has a display and two buttons to set it, the “A” button and the “B”
button. The watch has two modes of operation, display time and set time. In the display
time mode, hours and minutes are displayed, separated by a flashing colon. The set time
mode has two sub-modes, set hours and set minutes. The “A” button is used to select

modes. Each time it is pressed, the mode advances in the sequence: display, set hours,set minutes, display, etc. Within the sub-modes, the “B” button is used to advance the
hours or minutes once each time it is pressed. Buttons must be released before they can
generate another event. Prepare a state diagram of the watch.



No comments:

Post a Comment