Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a class named Card. The Card class should have the following member variable: An integer variable called cardValue. This cardValue member variable could
Write a class named Card. The Card class should have the following member variable: An integer variable called cardValue. This cardValue member variable could hold any one of the following numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9. The Card class must consist of the following member functions: A default constructor that initializes the cardValue to 0. A void member function named shuffle that assigns a random number on the card (permissible numbers are: 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9). When the member function, shuffle, is called, it will assign a number on the cardValue. A member function named getCardValue that returns the cardValue of the card. indom Write a complete C++ program that demonstrates how to use this Card class. This program should consist of 5 cards. The program should use a loop to shuffle the cards 3 times. Each time the cards are shuffled, display their card values and store their sum. The program should keep and display the total values of all cards after finishing looping here ord
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Based on the image you provided it seems you need to create a C class named Card with specific member functions and then write a program to demonstrat...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started