Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CST-210 5 Dice, 3 Rolls The purpose of this assignment is to assess your ability to do the following: Implement a class based on

CST-210 5 Dice, 3 Rolls The purpose of this assignment is to assess your ability to do the following: 2. Next, add a .cpp file to your project. Call this file DiceGame.cpp. This file will contain three 4. Write the code that allows the user to re-roll three times. Use the provided flowchart as a guide. The When you have finished your program, create a 3- to 5-minute video in which you 1. Run your program, 2.

CST-210 5 Dice, 3 Rolls The purpose of this assignment is to assess your ability to do the following: Implement a class based on a UML class diagram. Utilize objects in a software solution. Write a program based on a logical model (flowchart). In this assignment, you will write a program that simulates a dice game. 1. Start by implementing the Die class using the following UML model and data/method descriptions. Die sides : int value: int + Die (int) : + Die(): + roll(): void +getValue(): int //# of sides on the die int sides; //face-value of the die //1 2. Next, add a .cpp file to your project. Call this file DiceGame.cpp. This file will contain three functions: main (), a function to showDice (), and a function to get TotalScore (), as shown below. In function main(), create an array of five 6- sided dice. Write a loop that iterates over the array and rolls each die in the array. #include #include "Die.h" using namespace std; void showDice (Die[]); int getTotalScore (Die[]); int main() { ... } Function main int getTotalScore (Die theDice[]) { ... } void showDice (Die theDice[]) {... Function headers 3. Write the implementation for the method show Dice (). This method should display the dice in the following format: where the numbers on the top line indicate each die and the numbers on the bottom line indicate the face-value of the corresponding die. Test your method by passing the array of dice, created in main (). C:\Users\Lydia\Source\Rep Implementations 12345 55622 4. Write the code that allows the user to re-roll three times. Use the provided flowchart as a guide. The parts of the flowchart that appear in a rectangle with double lines at the ends are the processes that require additional logical development. start create myDice [5] end roll all the dice false j++ show result of the roll 1:40 3 input numToRo11/ j:40 j When you have finished your program, create a 3-to 5-minute video in which you 1. Run your program, 2. Explain the output produced, 3. Discuss the development process, including challenges and how you attempted to resolve them, 4. Tell how your project demonstrates the following assignment objective: "Implement a class based on a UML class diagram." To do this, explain how your class follows the UML diagram. Remember, you are explaining your work and NOT READING YOUR CODE. BEFORE you submit, make sure that Every file contains your name and statement of own work. Your code contains procedural comments comments that explain WHAT your programs are doing, as opposed to HOW they are doing it. Submit the following: A text document titled Links.txt that contains a link to your video. Your source code.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Please find the updated Die class and Main class attached below Dieh class Die private int sides int ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts In Federal Taxation

Authors: Kevin E. Murphy, Mark Higgins, Tonya K. Flesher

19th Edition

978-0324379556, 324379552, 978-1111579876

More Books

Students also viewed these Programming questions