Deal a card Write a program with a single button on it which, when clicked on, randomly selects a single playing card. First use the random number generator in the library to create a number in the...


Deal a card Write a program with a single button on it which, when clicked on, randomly selects a single playing card. First use the random number generator in the library to create a number in the range 1 to 4. Then convert the number to a suit (heart, diamond, club and spade). Next, use the random number generator to create a random number in the range 1 to 13. Convert the number to an ace, 2, 3, etc., and finally display the value of the chosen card.


Hint: use switch as appropriate.




May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here