Hello I'm working on C++. I'm not really sure how to add arrays and what to add in void getGrades. Program Requirements: Use two arrays of doubles for the grades. Use a global constant for the max size of the arrays Use a void function called GetGrades that accepts a single argument (one array) and prompts the user for grades to enter. Use a boolean function called GradesAreSame that accepts two arguments (both arrays) as constant parameters. It should return true if both arrays are the same and false if the arrays are different.
Hello I'm working on C++. I'm not really sure how to add arrays and what to add in void getGrades. Program Requirements: Use two arrays of doubles for the grades. Use a global constant for the max size of the arrays Use a void function called GetGrades that accepts a single argument (one array) and prompts the user for grades to enter. Use a boolean function called GradesAreSame that accepts two arguments (both arrays) as constant parameters. It should return true if both arrays are the same and false if the arrays are different.
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
Related questions
Question
Hello I'm working on C++. I'm not really sure how to add arrays and what to add in void getGrades.
- Use two arrays of doubles for the grades.
- Use a global constant for the max size of the arrays
- Use a void function called GetGrades that accepts a single argument (one array) and prompts the user for grades to enter.
- Use a boolean function called GradesAreSame that accepts two arguments (both arrays) as constant parameters. It should return true if both arrays are the same and false if the arrays are different.

Transcribed Image Text:1. Sample run 1
Getting Student One
Enter grade: 5
Enter grade: 5
Enter grade: 0
Enter grade: 0
Enter grade: 7
Getting Student Two
Enter grade: 3
Enter grade: 3
Enter grade: 0
Enter grade: 0
Enter grade: 7
Both students have the SAME grades!
2. Sample Run 2
Getting Student One
Enter grade: 100.00
Enter grade: 98.87
Enter grade: 87.00
Enter grade: 77.98
Enter grade: 33.23
Getting Student Two
Enter grade: 100.00
Enter grade: 97.87
Enter grade: 33.23
Enter grade: 87.00
Enter grade: 77.98
Both students have DIFFERENT grades!
3. Sample Run 3
Getting Student One
Enter grade: 98.2
Enter grade: 88.3
Enter grade: 77.0
Enter grade: 100.2
Enter grade: 98.1
Getting Student Two
Enter grade: 98.2
Enter grade: 88.3
Enter grade: 77.0
Enter grade: 100.2
Enter grade: 98
Both students have DIFFERENT grades!

Transcribed Image Text:3 #include <iostream>
0
7
8
9
10
11
12
13
14
15
10
17
18
19
27 v
28
29
30
31
32
ww
20 bool GradesAreSame(){
21
float grade1;
22
float grade2;
23
float grade3;
24
float grade4;
23
float grade5;
20
33
34
35
wwww
void GetGrades (double &);
bool GradesAreSame(int, double);
30
37
38
39
int main() {
std::cout << "Hello World!\n";
GetGrades (double);
GradesAreSame(int, double);
}
void GetGrades (){
}
}
for (int i = 0; i < 5; i++){
std::cout<<"Enter grade: \n";
std::cin>> grade1;
std::cout << "Enter grade: \n";
std::cin>> grade2;
std::cout<<"Enter
grade: \n";
std::cin>> grade3;
std::cout<<"Enter
grade: \n";
std::cin>> grade4;
std::cout << "Enter grade: \n";
std::cin>> grades;
}
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images

Knowledge Booster
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.Recommended textbooks for you

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education