Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 399 Weeks Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 28 Aug 2017 My Price 8.00

Coin class

  • Coin Toss Simulator

?Write a class named Coin. The Coin class should have the following member variable: ?

  • A????1 A string named sideUp. The sideUp member variable will hold either A????1headsA????1 or ?A????1tailsA????1 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 (A????1headsA????1 or A????1tailsA????1) and initializes the sideUp member variable accordingly. ?
    • A void member function named toss that simulates the tossing of the coin. When the toss member function is called, it randomly determines the side of the coin that is facing up (A????1headsA????1 or A????1tailsA????1) and sets the sideUp member variable accordingly. ?
    • A member function named getSideUp that returns the value of the sideUp member variable.

 

?Write a program that demonstrates the Coin class. The program should create an instance of the class and display the side that is initially facing up. Then, use a loop to toss the coin 20 times. Each time the coin is tossed, display the side that is facing up. The program should keep count of the number of times heads is facing up and the number of times tails is facing up, and display those values after the loop finishes. ?

Answers

(5)
Status NEW Posted 28 Aug 2017 11:08 AM My Price 8.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)