Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a JavaFX application named ShowRandomCards that generates a picture with one randomly selected card from a standard card deck(52 cars and two jokers). Use

Create a JavaFX application named ShowRandomCards that generates a picture with one randomly selected card from a standard card deck(52 cars and two jokers). Use JavaFX application. I believe it is JDK 8

The following is an example output with the picture being the American flag.

image text in transcribed

The file of image: image text in transcribed

It is flag6.gif ,but I am not sure how to send the attachment. You can pretend and use "flag6.gif.

Hint:

To generate a random number between 1 and 54:

int num1;

num1 = 1+(int) (Math.random() * 54);

To setup the path of the picture file:

String str = "image/card/" + num1 + ".png";

To rotate a picture:

Image image = new Image(new FileInputStream(str));

ImageView imageView = new ImageView(image);

imageView.setRotate(90);

X 0 - Showimage | ff t | * * * * | f * * * | + f f | E T * * * * | tt 4 | It it E i + + t + + + E | X 0 - Showimage | ff t | * * * * | f * * * | + f f | E T * * * * | tt 4 | It it E i + + t + + + E |

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions