Docsity

Assignment 9: Animation - Software Engineering I | CSI 3471, Assignments of Software Engineering

Toggle sidebar
bg1
CSI3471
AssignmentA9:Animation
Revised10/27/2008
ConstructaJavaEclipseprojectcalledA9Yournamethatcreatesasquareframe,roughly5X5inches,
withabuttoninthelowerleftcorner(labeledStart/Stop)andatextentryfieldinthelowerrightcorner
(labeledSpeed).
Createcodetodisplayaglobethattravelsaclockwisepath,representedbyanunderlyingcircle.The
windowshouldlooksimilartoFig.1below.(Pleaseforgivethebreakinthelineontheleftsideofthe
square.Forsomereasonthefiguredidnotcopycorrectlyfromtheotherfile.)
Theprogramshouldbehaveasfollows.
1. Theglobeshouldfirstbedisplayedatthe“9o’clockposition”.
2. WhentheglobeisstationaryandtheStart/Stopbuttonispushed,theglobebeginstomoveina
clockwisefashion(aroundthecircle)ataparticularrate.
Assumethatthedefaultrateis1rotationforevery5seconds
3. WhentheglobeismovingandtheStart/Stopbuttonispushed,theglobestopsmoving.
4. Whenarateisenteredthemovementoftheglobeisadjustedaccordingly.Assumethatthe
unitsare“numberofrotationsforevery5seconds”.Also,assumethatthelegalrangeofvalues
is1through5,inclusive.Ifavalueoutsidethisrangeisentered,thenthereshouldbenoeffect
ontherotation.

   
 


 
 
 
 
 
 
 
Start/Stop Rate: 
Figure1.

Partial preview of the text

Download Assignment 9: Animation - Software Engineering I | CSI 3471 and more Assignments Software Engineering in PDF only on Docsity!

CSI 3471

Assignment A9 : Animation Revised 10/27/ Construct a Java Eclipse project called A9Yourname that creates a square frame, roughly 5 X 5 inches, with a button in the lower left corner (labeled Start/Stop) and a text entry field in the lower right corner (labeled Speed). Create code to display a globe that travels a clockwise path, represented by an underlying circle. The window should look similar to Fig. 1 below. (Please forgive the break in the line on the left side of the square. For some reason the figure did not copy correctly from the other file.) The program should behave as follows.

  1. The globe should first be displayed at the “9 o’clock position”.
  2. When the globe is stationary and the Start/Stop button is pushed, the globe begins to move in a clockwise fashion (around the circle) at a particular rate.  Assume that the default rate is 1 rotation for every 5 seconds
  3. When the globe is moving and the Start/Stop button is pushed, the globe stops moving.
  4. When a rate is entered the movement of the globe is adjusted accordingly. Assume that the units are “number of rotations for every 5 seconds”. Also, assume that the legal range of values is 1 through 5, inclusive. If a value outside this range is entered, then there should be no effect on the rotation. Start/Stop Rate: Figure 1.