Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

JAVA FX PROBLEM BLANK_TTT.giff - https://www.dropbox.com/s/q21ofd8pvj6w3u7/Blank

ID: 3806127 • Letter: J

Question

JAVA FX PROBLEM

BLANK_TTT.giff - https://www.dropbox.com/s/q21ofd8pvj6w3u7/Blank_TTT%20%281%29.gif?dl=0

l 4. I (Display images) Write a program that displays four images in a grid pane, as shown in Figure 14.43a Exerdse14 01. Exercise 14 02 D O XO (a) (b) (c) FIGURE I4.43 Exercise 14.1 displays four images. (b) Exercise 14.2 displays a tic-tac-toe board with images. (c) Three cards are randomly selected. 4.2 Tic-tac-toe board) Write a program that displays a tic-tac-toe board, as shown in Figure 14.43b. A cell may be X, O, or empty. What to display at each cell is randomly decided. The X and O are images in the files x.gif and o.gif. 4.3 (Display three cards Write a program that displays three cards randomly selected from a deck of 52, as shown in Figure 14.43c. The card image files are named 1.png, 2.png, 52.png and stored in the image/card directory All three cards are distinct and selected randomly. Hint: You can select random cards by storing the numbers 1-52 to an array list, perform a random shuffle introduced in Section and use the first three numbers in the array list as the file names for the image.

Explanation / Answer

14.1-

ImageView im=new ImageView("flag.jpeg)

grid.add(im);

ImageView im2=new ImageView("flag1.jpeg)

grid.add(im);

ImageView im3=new ImageView("flag2.jpeg)

grid.add(im3);

ImageView im4=new ImageView("flag3.jpeg)

grid.add(im4);