Assignments 11 - C++ Assignment 6H 11 - C++ Assignment 6 C++ Assignment 6 Follow the instructions for C++ Assignment 6 Submit the ZIP file back to this assignment Instructions - C++ Assignment 6...

hello i need this assignment today is there any one who can help me.


Assignments 11 - C++ Assignment 6H 11 - C++ Assignment 6 C++ Assignment 6 Follow the instructions for C++ Assignment 6 Submit the ZIP file back to this assignment Instructions - C++ Assignment 6 include header file for console input/output include header file for strings include custom header file (#include "cpp_fn06_1234567.h") Use a single-line comment to introduce the prototype section displayMessage() and prompt() will be defined in the main program file instead of the header file for illustration purposes void displayMessage(string msg); - displays a message int prompt(string msg); - prompts user for a number and returns the response Call displayMessage() to display the "hello" message (instead of the typical cout) This assignment will demonstrate basic use of functions. In REPL, create a new C++ project named cpp_hw06_1234567, where 1234567 is your TCC student ID CTRL + A to select all, then DEL to delete This assignment will use a custom header file to store some function definitions used by the program. You will need to add an additional file to your project named cpp_fn06_1234567.h, where 1234567 is your TCC student ID. main.cpp - the main program file Header comments - as described previously Header files - as described previously Prototypes Main program - as described previously Hello - as described previously Part 1 - as described previously (all Parts) myTCC How To Organizations Online Academic Advising Need Help?Sahra Mahamud https://tccd.blackboard.com/ https://my.tccd.edu/webapps/blackboard/execute/courseMain?course_id=_231034_1 https://my.tccd.edu/webapps/blackboard/content/listContent.jsp?course_id=_231034_1&content_id=_11837371_1&mode=reset https://my.tccd.edu/webapps/assignment/uploadAssignment?content_id=_12029623_1&course_id=_231034_1&group_id=&mode=view https://my.tccd.edu/webapps/portal/execute/tabs/tabAction?tab_tab_group_id=_82_1 https://my.tccd.edu/webapps/portal/execute/tabs/tabAction?tab_tab_group_id=_83_1 https://my.tccd.edu/webapps/portal/execute/tabs/tabAction?tab_tab_group_id=_290_1 https://my.tccd.edu/webapps/portal/execute/tabs/tabAction?tab_tab_group_id=_161_1 https://my.tccd.edu/webapps/portal/execute/tabs/tabAction?tab_tab_group_id=_101_1 https://my.tccd.edu/webapps/login/?action=logout javascript: void(0); Call displayMessage() to display Part 1 (instead of the typical cout) Call prompt() to prompt the user for a lower bound (store response in variable) Call prompt() to prompt the user for an upper bound (store response in variable) Call roll() to generate a random number between lower and upper bounds (store response in variable) Call displayMessage() to display the randomly generated number Use to_string() to cast the roll() result to a string (example: to_string(num)) Use + to concatenate (add) The random number is and the number (the result will be the message sent to displayMessage()) Call displayMessage() to skip a line (pass an empty string, "") Call displayMessage() to display Part 2 Define variables for total (int) and results (string) Call prompt() to prompt the user for number of dice to roll (store response in variable) Call prompt() to prompt the user for number of sides on each die (4, 6, 8, 10, etc. --- store response in variable) Call dice() to roll the dice and update total and results values Call displayMessage() to display results Call displayMessage() to display the total value for all the dice Use to_string() to cast total to a string Use + to concatenate The total value is and the value of total Call displayMessage() to skip a line Call displayMessage() to display the "goodbye" message (instead of the typical cout) Use comments to document the purpose of the function and its parameters Use cout to display the message Use comments to document the purpose of the function, its return value, and its parameters Declare an int variable Use cout to display the prompt, and cin to receive the response Return the response // This function ... // RETURNS: - describe what (if anything) the function returns // PARAMETERS: - on separate lines, describe each parameter for the function include header file for random number generation include header file for accessing system clock include header file for strings use the standard namespace Part 2 Goodbye - as described previously displayMessage() prompt() cpp_fn06_1234567.h - the custom header file Include prototypes in the custom header file. Each function should be documented with comments (example shown below): Header comments - similar to header comments for main program, these describe functions defined in custom header file and include your name and the date Header files - as described previously seed() javascript: void(0); Function header: void seed() Use comments to document the function Seed the random number generator Function header: int roll(int upper, int lower = 1) Use comments to document the function Use a static bool variable (set initially to false) to check if random number generator has been seeded if not, call seed() then set the value true Return a randomly generated number between lower and upper bounds Function header: void dice(int sides, int count, int& total, string& results) Use comments to document the function Set total to 0 and results to an empty string Use a for loop to iterate through each die. Inside the loop, do the following: Call roll() using only sides as the upper bound (store result in variable) Add the roll() result to total Use += to update results string with the concatenation (use +) of roll: , the roll() result (use to_string() to cast), and \n roll() dice() Download the project, and submit the ZIP file to the assignment javascript: void(0);
Jun 26, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here