Please code using C++ and only use header . Any others will not be accepted. Please write using a globlal constant const int NO=10 and not #define. This is intended to be completed by using for loops as well as the global constant. Thank you!

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please code using C++ and only use header <iostream>. Any others will not be accepted. Please write using a globlal constant const int NO=10 and not #define. This is intended to be completed by using for loops as well as the global constant. Thank you!

**Exams.cpp: Understanding Weighted Averages**

This example illustrates how to calculate weighted averages using a series of test scores.

### Test Scores and Weighted Average Calculation

**Scores:**

- **Test 1:** 60, 50, ..., 55
- **Test 2:** 70, 60, ..., 65
- **Test 3:** 80, 70, ..., 75
- **Test 4:** 90, 80, ..., 84

#### Calculation for Weighted Average:

- The formula for calculating the weighted average is: 
  \[
  0.1(60) + 0.25(70) + 0.3(80) + 0.35(90)
  \]

- Breakdown of calculation:
  \[
  = 6 + 17.5 + 24 + 31.5 = 79.0
  \]

- **Weighted Averages:**
  - First four scores yield a weighted average of **79.0**.
  - Further, a weighted average of **69** is calculated using other series of scores.
  - Another set yields a weighted average of **73.65**.

### Averages Calculation for Each Test:

1. **Test 1:**
2. **Test 2:**
3. **Test 3:**
4. **Test 4:**

### Additional Instructions

You should sum up all scores for test one and divide by ten to compute its unweighted average. Repeat this procedure for test two, test three, and test four. This process results in four unweighted averages.

This example aids in understanding how weights impact overall performance in a series of assessments, crucial for educational evaluations.
Transcribed Image Text:**Exams.cpp: Understanding Weighted Averages** This example illustrates how to calculate weighted averages using a series of test scores. ### Test Scores and Weighted Average Calculation **Scores:** - **Test 1:** 60, 50, ..., 55 - **Test 2:** 70, 60, ..., 65 - **Test 3:** 80, 70, ..., 75 - **Test 4:** 90, 80, ..., 84 #### Calculation for Weighted Average: - The formula for calculating the weighted average is: \[ 0.1(60) + 0.25(70) + 0.3(80) + 0.35(90) \] - Breakdown of calculation: \[ = 6 + 17.5 + 24 + 31.5 = 79.0 \] - **Weighted Averages:** - First four scores yield a weighted average of **79.0**. - Further, a weighted average of **69** is calculated using other series of scores. - Another set yields a weighted average of **73.65**. ### Averages Calculation for Each Test: 1. **Test 1:** 2. **Test 2:** 3. **Test 3:** 4. **Test 4:** ### Additional Instructions You should sum up all scores for test one and divide by ten to compute its unweighted average. Repeat this procedure for test two, test three, and test four. This process results in four unweighted averages. This example aids in understanding how weights impact overall performance in a series of assessments, crucial for educational evaluations.
**Problem 7: Exams.cpp**

A teacher assigns weights to four exams: 10%, 25%, 30%, and 35% respectively. The task is to write a program that processes ten sets of four grades each. The program should calculate and print:

1. The weighted average of each set of grades.
2. The unweighted average for each exam across all sets.

A global constant should be used to define the number of student sets.

---

There are no graphs or diagrams in the image to describe.
Transcribed Image Text:**Problem 7: Exams.cpp** A teacher assigns weights to four exams: 10%, 25%, 30%, and 35% respectively. The task is to write a program that processes ten sets of four grades each. The program should calculate and print: 1. The weighted average of each set of grades. 2. The unweighted average for each exam across all sets. A global constant should be used to define the number of student sets. --- There are no graphs or diagrams in the image to describe.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education