Write a JavaFx application that displays a series of pictures of a person with arms, legs, and

Question:

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.


Listing 4.9

import javafx.application.Application; import javafx.scene.canvas.Canvas; import javafx.scene. Scene; import javafx.scene. Group; import javafx.stage.Stage; import javafx.scene.canvas.GraphicsContext; import javafx.scene.shape.. ArcType; import javafx.scene.paint.Color; import javafx.scene.text.Font; public class MultipleFaces extends Application { public static final int WINDOW WIDTH = 450; public static final int WINDOW HEIGHT = 300; public static final int FACE DIAMETER =

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: