Lab6 - CSE115 Lab 6 Introduction Fall 2009 In this (two...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE115 Lab 6 Fall 2009 Introduction In this (two week) lab you will build your largest program so far in the course. You are to build the control software for a simple digital watch. The control software is state-based: the behavior of the various buttons on the watch depends on the state the watch is in. To get a better idea of what the finished product should do, run a lab demo by typing, at the Linux prompt: java -jar /projects/CSE115/Fall2009/FA09-CSE115-Lab6.jar NOTE: This jar file contains no source code. Decompiling this demo is a flagrant violation of the policy on academic integrity and will minimally result in immediate failure in the course. The demo will be shown in recitation. Preparatory tasks 1. Log in 2. Start Eclipse 3. Switch to the CVS Repository Exploring perspective 4. Check out the FA09-CSE115-Lab6 project from the Labs repository 5. Switch to the DrJava perspective Lab description You will develop the control system of the watch in stages. In the end the watch will incorporate a stopwatch feature, but we will not worry about that to start with. Stage one The watch has two buttons (labeled “A” and “B”), one display, and three modes of operation. Here is a state diagram and a textual description of the behavior of the watch in its three modes: press “B”: add one to minute press “A” : change state press “B”: add one to hour press “A” : change state press “A” : change state DISPLAY TIME SET HOUR SET MINUTE press “B” : do nothing
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CSE115 Lab 6 Fall 2009 State name and description What should happen when button “A” is pressed What should happen when button “B” is pressed DISPLAY TIME In this state the display of the watch must show the current time in HH:MM:SS format, updated once per second. State of the watch must change to SET HOUR. Nothing. SET HOUR In this state the watch must allow the hour to be changed. State of the watch must change to SET MINUTE. The hour of the time must
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Lab6 - CSE115 Lab 6 Introduction Fall 2009 In this (two...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online