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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:30, westjayson69
Requirement types discussed during software development include functional and color scheme nonfunctional and code style constraint and nonfunctional fashionable and functional.
Answers: 2
image
Computers and Technology, 22.06.2019 09:30, relic7391
Is a string of code written to hurt others by damaging or destroying
Answers: 1
image
Computers and Technology, 23.06.2019 20:00, shaheedbrown06
What software programs are used to to create professional publication? a.) graphics programs b.) word processors c.) page layout programs d.) spreadsheet programs
Answers: 2
image
Computers and Technology, 23.06.2019 21:00, webbjalia04
Uget brainliest if accurate mary has been given the responsibility of hiring a person for the position of a software testing officer. which management function would mary achieve this responsibility?
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 in other subjects:

Konu
Mathematics, 26.01.2021 23:40
Konu
English, 26.01.2021 23:40