Create a movie of a turtle (turtle.jpg) crawling across the beach (beach.jpg).
What will be an ideal response?
```
/? ?
? Method t o c r e a t e a movie where a t u r t l e c r a w l s
? across the beach
? @param d i r e c t o r y t h e d i r e c t o r y t o s t o r e t h e frame s i n
?/
public void makeTurtleMovie ( S t r i n g d i r e c t o r y )
{
// g e t t h e p i c t u r e s t o u s e
P i c t u r e p i c t 1 = new P i c t u r e ( F i l e C h o o s e r . getMediaPath ( ” beach . j p g ” ) ) ;
P i c t u r e p i c t 2 = new P i c t u r e ( F i l e C h o o s e r . getMediaPath ( ” t u r t l e . j p g ” ) ) ;
P i c t u r e c o p y P i c t = null ;
// d e c l a r e o t h e r v a r i a b l e s
FrameSequencer f r a m e S e q u e n c e r =
new FrameSequencer ( d i r e c t o r y ) ;
int framesPerSec = 3 0 ;
// l o o p c r e a t i n g t h e frames
f o r ( i n t i = 0 ; i < f r a m e s P e r S e c ; i ++)
{
c o p y P i c t = new P i c t u r e ( p i c t 1 ) ;
c o p y P i c t . copy ( p i c t 2 , i + 7 , 3 0 0 ) ;
f r a m e S e q u e n c e r . addFrame ( c o p y P i c t ) ;
}
// p l a y t h e movie
frameSequencer . play ( framesPerSec ) ;
}
```
You might also like to view...
Accessor that returns fuel tank capacity
What will be an ideal response?
Which of the following should a user enable if she wants to host a gaming server on a home network?
A) DMZ B) DHCP C) Port forwarding D) SSID broadcasting
Which IPS response to an attack can do the most damage?
A. limiting suspicious traffic to a certain percentage of the total bandwidth and dropping packets B. limiting suspicious traffic to a certain percentage of the total bandwidth C. None of the options D. Dropping packets
What is scalability? How does it relate to clustering?
What will be an ideal response?