Exercises for Chapter 6

6.1 Extend the the MenuBarTuttle interface to add controls for the GeometricTuttle class from Exercise 4.4.

6.2 Redesign, and subsequently re-implement, the MenuBarTuttle's Move and Turn menus so that the user can move or turn the tuttle an arbitrary number of units. This should be accomplished, for example when moving the tuttle forwards, by interposing a cascading menu which offers two further cascading menus labelled tens and units. The tens menu should offer items which move the tuttle 10, 20, 30 steps etc. and the units menu items to move it 1, 2, 3 steps etc. So if the user wanted to move the tuttle 47 steps they could activate the Move/ Forwards/ tens/ 40 item followed by the Move/ Forwards/ units/ 7 item.

6.3 Redesign, and subsequently re-implement, the MenuBarTuttle's Move and Turn menus so that the user can move or turn the tuttle an arbitrary number of units. This should be accomplished, for example when moving the tuttle, by a single item on the Move menu labelled Steps … Activating this item should post a dialog which contains a feedback Label, a horizontal ScrollBar and Forward, Backward and Dismiss buttons. So if the user wanted to move the tuttle 47 steps they could post the dialog, set the slider to 47, confirming this in the feedback Label, and then pressing the Forward button.

6.4 How could you find out which of the interfaces from 6.2 and 6.3 was favoured by the users?

6.5 Install suitable accelerators into the menu structure and attempt to determine by investigation if their presence assists users. Does the experience level of the user make the more likeley to use accelerators?

6.6 Provide an Exit button and a Help ImageButton for the SemiDirectInterface from Chapter 5 and cause them to post the appropriate dialog when they are pressed.

6.7 Design and implement the alternative help system as described in the chapter.

6.8 Re-implement the ExitDialog class so that an instance of the class is created each time the user activates the File menu Exit … item and is destroyed each time the user dismisses it. Attempt to determine if there are any significant differences in the time it takes for the application to initialise itself and in the time it takes for the dialog to be posted between this implementation and the implementation as described in the chapter.


Table of Contents.

Summary of Chapter 6




A Java GUI programmer's primer
Java GUI Programmers Primer, A
ISBN: 0139088490
EAN: 2147483647
Year: 1998
Pages: 85
Authors: Fintan Culwin

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net