The programming objective of this lab is to introduce the following concepts:
timers
frames
radio buttons
check boxes
menus
other controls
The idea behind the prototype is pretty simple - design a clock that will go off when a specified amount of time has passed (How Long to Sleep or Snooze) OR goes off at a specific time (When to Wake Up). Selecting one of these 2 options should enable the correct hour-minute-second text boxes whose values will be used to set the timer. To set the alarm after you entered the time to sleep or wake-up time, click on the 'Set Alarm' button.
After the alarm 'goes off', you should display what time it is
(the now text box) and a small message box like this -
If you want to 'snooze' (sleep a little longer), then clicking on the 'Snooze' button will set the alarm clock to wake up after 5 minutes (default), or, you can set the snooze time and then click on the snooze button.
Timers can count up to 32767 or 65535 (I think?!) ... and they count in
milliseconds (1000 milliseconds = 1 second) ... so if you set the clock to
wake you up in 10 hours (10 hours * 60 minutes per hour * 60 seconds per
minute * 1000 milliseconds per second), well, you have a number that's too
big for the timer.
Usability - users can enter whacked data into the text boxes
... not good ... can you redesign the alarm clock so that they
can never enter an invalid time? This redesign is the second
part of this lab. Thus, you should save your prototype (in
2 weeks), and then also save your redesign (1 class meeting later). Be
prepared to present BOTH versions.
Design Doc: describe the original prototype, and the most difficult algorithm(s) to develop. For the redesign, discuss why you did what you did, and what you had to add (or subtract) to build it.
Designed & Created by DrB - Last update: 09 Feb 2010 02:19 PM