Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C++ code must use standard namespace Develop an abstract base class RandGen that

ID: 3904270 • Letter: C

Question

C++ code must use standard namespace

Develop an abstract base class RandGen that will be used for generating random numbers or strings in various questions. Give some supporting (mathematical) arguments for all your work in your report. Use library functions from the standard library like rand), srand() and time(). I suggest you use srand(time(0) to seed the random number generator. Create four derived classes RandLotto, RandDay, RandTime and RandString. The RandLotto will be used to generate random drawings for California Super Lotto Plus based on 5 numbers from 1 to 47 and one additional Mega number from 1 to 27. See www.Calottery.com/ games/superlotteryplus for Lottery rules. The RandDay will generate a random day of the year, use the class Date from the textbook. Make sure you look into the case of leap years to make it absolutely random. The RandTime will generate a random time of the day using class Time from textbook. The RandString will be used as a base class for two derived classes: RandStr will generate a random strings at most 256 characters long and a RandMsgOfTheDay will return a random message of the day (use a table of messages in memory- or in a file). Test all your classes. Use the classes from problem above for the following: Try to find what are your chances to win the California Super Lottery through a computer simulation. I suggest you keep generating random Super Lotto draws in a loop until you win, say 100 times. Try to have a significant number of wins before you draw a conclusion.

I // Fig. 9.25: Time.h 2 // Time class modified to enable cascaded member-function calls. 3 #include 5 // Time class definition. 6 // Member functions defined in Time.cpp 7 #ifndef TIME-H 8 #define TIME-H 8. 9.25 3 Time class modified to enable cascaded member-function calls. (Part I of 2.)

Explanation / Answer

What exactly is needed here? Please be more specifc and ask what would help you to go ahead.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote