Monday, 27 March 2017

Core Java Assignment 25

Core Java Assignment 25


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

Assignment 25


Some combined bath-showers have two faucets and a lever for controlling the flow of the
water. The lever controls whether the water flows from the showerhead or directly into the
tub. When the water is first turned on, it flows directly into the tub. When the lever is

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

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.

Core Java Assignment 22

Core Java Assignment 22


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

Assignment 22



Prepare a class diagram from the instance diagram in the following figure