(Solved):In C++ Write a class named Coin. The Coin class should have the following member variables: A string named sideUp. The sideUp member variable will holder either “heads” or “tails” indicating the s… View Answer…

 

Question

In C++

Write a class named Coin. The Coin class should have the following member variables: A string named sideUp. The sideUp member variable will holder either “heads” or “tails” indicating the side of the coin that is facing up.

The Coin class should have the following member functions:

A default constructor that randomly determines the side of the coin that is facing up (“heads” or “tails”) and initializes the sideUp member variable

Scroll to top