<!DOCTYPE html>
<!-- saved from url=(0097)https://content.byui.edu/file/cddfb9c0-a825-4cfe-9858-28d5b4c218fe/1/Prepare/124.3.1.Prepare.html -->
<html lang="en_US" aria-hidden="false"><style class="f123-toc-dev-style">.f123-toc-select { position: relative; z-index: 9999999;}.f123-aria-landmark:focus, .f123-aria-landmark *:focus { outline: 2px solid red;}</style><div id="f123-access-help-message-cont" tabindex="-1"></div><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Prepare 3.1 : Array Design</title>
<link href="./Prepare 3.1 _ Array Design_files/styles.css" rel="stylesheet" type="text/css">
<style>*:focus { outline: 5px solid #f00 !important; }</style></head>
<body style="" f123-lib-once-proc="true"><select id="f123_toc_select_id" class="f123-toc-select f123-toc-main" aria-label="F123 Access Table of Contents"><option>F123 Access Table of Contents</option><option value="main">1 Main Content: 5 Main Headings</option></select>
<div id="main" class="splash f123-aria-landmark" role="main">
<div id="header">
<img class="banner" alt="CS 124 Banner" title="CS 124 Banner" src="./Prepare 3.1 _ Array Design_files/124.3.Banner.jpg">
</div> <!-- id="header" -->
<article>
<h1>Prepare 3.1 : Array Design</h1>
<p>Start with Assignment 3.0 and modify the function <code>averageGrades()</code> so that it does not take
into account grades with the value -1.
In this case, -1 indicates the assignment was not completed yet so it should not factor in the average.</p>
<h2>Examples</h2>
<p>Two examples… The user input is <span class="input">underlined</span>.</p>
<h3>Example 1</h3>
<pre>Grade 1: <span class="input">90</span>
Grade 2: <span class="input">86</span>
Grade 3: <span class="input">95</span>
Grade 4: <span class="input">76</span>
Grade 5: <span class="input">92</span>
Grade 6: <span class="input">83</span>
Grade 7: <span class="input">100</span>
Grade 8: <span class="input">87</span>
Grade 9: <span class="input">91</span>
Grade 10: <span class="input">-1</span>
Average Grade: 88%
</pre>
<p>Notice how the -1 for the 10<sup>th</sup> grade is not factored into the average.</p>
<h3>Example 2</h3>
<pre>Grade 1: <span class="input">-1</span>
Grade 2: <span class="input">-1</span>
Grade 3: <span class="input">-1</span>
Grade 4: <span class="input">-1</span>
Grade 5: <span class="input">-1</span>
Grade 6: <span class="input">-1</span>
Grade 7: <span class="input">-1</span>
Grade 8: <span class="input">-1</span>
Grade 9: <span class="input">-1</span>
Grade 10: <span class="input">-1</span>
Average Grade: ---%
</pre>
<p>Since all of the grades are -1, there is no average. You will need to handle this condition.</p>
<h2>Assignment</h2>
<p>The test bed is available at:</p>
<pre>testBed cs124/assign31 assignment31.cpp</pre>
<p>Don't forget to submit your assignment with the name "Assignment 31" in the header.</p>
</article>
</div> <!-- id="main" -->
</body><div id="f123-desc-label-from-markup">~ </div></html>