Menu

Homework Doable However Dont Previous Knowledge Arrays Professor Explain Next Week Arrays Q43880647

this homework is doable however I dont have any previousknowledge of arrays and our professor will explain it next week.arrays helped my classmates do the bonus part which i would like todo but they did it with arrays in 5 minutes. please help me get the40 extra points

• C++ TwoZi: write a program that simulates a modification tothe dice game “Tenzi” in which 2 dice are rolled randomly for one(1) player only. Check whether the two dice rolls match to the samenumber. If the 2 dice don’t match, reroll them until they do andkeep track of how many rolls.

Program Specifications  In comments at the top of your program,list your name(s) and GE1502 class section (8am, 9:15am or 1:35pm). In comments at the top of your program, write out 5 or so linesof pseudocode (English words only, no C++ syntax) to explain whatyour program does.  At the beginning of your program, cout yourname (and any partner’s name) & class section.  At thebeginning of your program, prompt your user for player name andsave name as a string to cout later in the program (see the outputshown on the next page for details).  Prompt your user for a“seed” value or use an automatic timestamp to generate a trulyunique seed number and display that seed number with a coutstatement.  Cout the name of the game “TwoZi” (or “ThreeZi” or“FourZi” or …. “TenZi”).  Cout the objective (rules of the game). Write a custom function using the built-in C++ function rand( )that generates a random integer between 1 & 6. You will callthis custom function from your main program several times, one timefor each die to roll.  If the two dice rolls match, cout a message“TwoZi!”. TwoZi Grading Rubric (60 XPs): Your name(s) & classsection as comments at top of .cpp 2 XPs Pseudocode comments at thebeginning to explain logic 3 XPs Cout your name (and partner’sname) plus class section. 2 XPs Prompt user for name & coutlater in the program 3 XPs Prompt user for seed or setup automatictime seed & cout seed # 5 XPs Custom function with rand()%(b-a+1)+a to generate dice roll 10 XPs Random integers between 1– 6 5 XPs Count the number of rolls & cout 5 XPs Output lookslike sample (next page) 15 XPs Program works every time 5 XPsScreenshot of output (when students run their own program) 5 XPs(upload .jpg or .png of program output) Professor J. Love GE 1502Cornerstone of Engineering 2 2  If the two dice do NOT match,re-roll both dice using the built-in C++ function rand( ) again togenerate new numbers between 1 & 6. Check again if the two newdice rolls match.  Use a counter to count the number of times thedice are rolled until they are a match, including the last roll inwhich they match. Cout the number of rolls required to achieve thematch.  Cout a statement that thanks the player by name forplaying.  Bonus: +5 XPs for each additional die you add to yourworking program (ThreeZi, FourZi, FiveZi, …, TenZi). In thesevariations, if any 2 dice match initially, put them aside andreroll the remaining die (or dice) until all dice match theoriginal matched number. Only re-roll all the dice if none match.Do not simply re-roll all the dice if only a few match. You mayimplement arrays if desired.

Expert Answer


Answer to this homework is doable however I dont have any previous knowledge of arrays and our professor will explain it next week…

OR