subject

Playing cards are used in many computer games. Design a Card class that contains a character data field to hold a suit (s for spades, h for hearts, d for diamonds, or c for clubs) and an integer data field for a number from 1 to 13. Include get and set methods for each field. Write an application that randomly selects four playing cards and displays their values. randomly assign a suit to each of the cards, and generate a random number for each card’s number " if you are not familiar of how to generate random numbers in C++, simply search for that". To fully understand the process, you need to randomly generate an integer that can hold a value from 1 to 13 and generate anther random integer that can hold a value from 1 to 4, you can associate each suit character with an integer in this range [1-4]. The game should be able to determine the card with the higher value which is the winner. The card is calculated as following: s card value= 1 * card number h card value=1.25*card number d card value=1.50*card number c card value=1.75* card number Test your project for 10 times.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
How often does colleges update the cost of attendance on their website? . a)every two years b) every four years c) every year d) every semester
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Alcohol’s affects on the cornea and lens of the eye make it more difficult
Answers: 1
You know the right answer?
Playing cards are used in many computer games. Design a Card class that contains a character data fi...
Questions
question
Mathematics, 27.08.2019 21:00
question
Social Studies, 27.08.2019 21:00
Questions on the website: 13722363