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, 23.06.2019 10:00
Whats three fourths of 15(this is supposed to be in math but i clicked too fast)
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
To check whether your writing is clear , you can
Answers: 2
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
question
Computers and Technology, 24.06.2019 08:30
Formatting rows and columns is similar to cell formatting. in an openoffice calc spreadsheet, you can format data entered into rows and columns with the of the rows and columns options. you can insert rows and columns into, or delete rows and columns from, a spreadsheet. use the insert or delete rows and columns option on the insert tab. alternatively, select the row or column where you want new rows or columns to appear, right-click, and select insert only row or only column options. you can hide or show rows and columns in a spreadsheet. use the hide or show option on the format tab. for example, to hide a row, first select the row, then choose the insert tab, then select the row option, and then select hide. alternatively, you can select the row or columns, right-click, and select the hide or show option. you can adjust the height of rows and width of columns. select row and then select the height option on the format tab. similarly, select column, then select the width option on the format tab. alternatively, you can hold the mouse on the row and column divider, and drag the double arrow to the position. you can also use the autofit option on the table tab to resize rows and columns.
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
Social Studies, 09.12.2021 18:00
question
Social Studies, 09.12.2021 18:00
question
Social Studies, 09.12.2021 18:00