Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING C++ A score board uses an array of light bulbs to make up each digit, arranged in seven rows of five bulbs each. Your

USING C++ image text in transcribed

A score board uses an array of light bulbs to make up each digit, arranged in seven rows of five bulbs each. Your primary objective is to design, write and test a function that takes an integer ranging from 0 to 99 as a parameter and returns a single three-dimensional Boolean array to be used by the main score board software. (You may practice with a simpler 2-dimensional array: aDigit ROWS]ICOLSJ The array must be in this form: bool score DIGITS ROWSI[COLS]: DIGITS is can only have one of two enumerated values: LEFT or RIGHT (for left side or right side digit). ROWS must be 7, and COLS must be 5. If an element is true the bulb will be lit, and if the element is false it will not. The function prototype must be in this form: void getScoreBoardArray(int score, bool arr[ROWS][COLS]); / sets the content/values in the array You must subdivide the work of this function into smaller functions called by this function. OPTIONAL: create a file to hold array values. You must create driver code in main that declares the array, calls a function to get a random number for the score (your code must output the number), calls the getScoreBoardArray function, and passes the filled array to a function that display the score as ASCII art. Your main must begin by calling int testAll0: I/ a function to fully test each function (except main) at least 4 different ways. testAll0 must display and return the count of how many test were run. You must use asserts where feasible. I have provided 10 functions (num0 through num9) that will set array elements to true so as to display each of the ten numerals (0-9). The void numl(bool arrROWS[COLS], int place) function has the numeral 1 offset in the grid, one space to the right. You must fix that so the numeral 1 is centered in the grid (see the SCOREBOARD NUMBERS images below). EXAMPLE OUTPUT and INDIVIDUAL NUMERALS i |2|3|4 score # 43 ress any key to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions