Write a JavaFX application that displays a series of pictures of a person with arms, legs, and of course a head. Use a happy face for the head. Use ovals for the body, arms, and legs. Draw a sequence of figures that appear one after the other, as in Listing 4.9. Make the figures assume a running position. Change the color of the person’s face in each succeeding figure, going from white to pink to red to yellow to green. Have the smiling face gradually change its mouth shape from a smile on the first person to a frown on the last person. Use a switch statement to choose the color. Embed the switch statement in a loop.
This program is based on the MultipleFaces.java program in Listing 4.9. Rather than using odd and even counter values to determine color, this program uses a switch to determine the face color and the height adjustment of the mouth. The mouth height adjustment is used to gradually change the mouth from a smile to a frown. Also, a number of constants are added for the position and size of the arms, legs, and body.
See the code in RunningFaces.java
You might also like to view...
What is MTBF?
A. the maximum amount of time that an organization can tolerate a single resource or function being down B. the average time required to repair a single resource or function when a disaster or disruption occurs C. the estimated amount of time a device will operate before a failure occurs D. the shortest time period after a disaster or disruptive event within which a resource or function must be restored to avoid unacceptable consequences
When filmmakers begin a film project, they begin filming right away.
Answer the following statement true (T) or false (F)