-
Notifications
You must be signed in to change notification settings - Fork 0
/
AnimatedSmiley.txt
45 lines (29 loc) · 1.16 KB
/
AnimatedSmiley.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// AnimatedSmiley.txt
//
//
// ICS 45J Lab Assignments 2 and 3
//
// Information about the public aspects of the AnimatedSmiley class.
//
// A smiley that can move around a screen;
// that is, an extended smiley face that
// has movement information and methods
class AnimatedSmiley extends SmileyFace
// Build a from-scratch AnimatedSmiley to move around the display
// It is the same as a from-scratch SmileyFace, with initial
// movement information.
public AnimatedSmiley(int startXMovement, int startYMovement)
// Copy an existing AnimatedSmiley
public AnimatedSmiley(AnimatedSmiley orig)
// Copy an existing AnimatedSmiley, but replace its movement information
// with new movement information
public AnimatedSmiley(AnimatedSmiley orig, int startXMovement, int startYMovement)
// moveIt - move -- translate -- the smiley along the x and y dimensions the
// amounts and directions embodied in its current movement fields
public void moveIt()
// Set the movements
public void setCurrentXMovement(int xValue)
public void setCurrentYMovement(int yValue)
// Access the current movements
public int getCurrentXMovement()
public int getCurrentYMovement()