21.08.2013 Views

Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

104 Chapter 8 ■ Functional decomposition<br />

Figure 8.1 Cyberspace invaders<br />

The program responds to events from the play button, a timer, mouse clicks and<br />

mouse move events. To create animation, we move all the objects and redisplay them<br />

whenever the timer produces an event. So the overall logic is:<br />

timer event<br />

move all the objects<br />

display all the objects<br />

check hits<br />

mouse clicked event<br />

create laser<br />

mouse moved event<br />

move defender<br />

>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!