Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Intro CS Question #3 free response review. Write the following function. string

ID: 3760033 • Letter: I

Question

Intro CS Question #3 free response review.

Write the following function.

string Student::getName() {
    // YOUR CODE HERE
    return ""; // <--- delete this
}

int Student::getNumGrades() {
    // YOUR CODE HERE
    return 0; // <--- delete this
}

void Student::addGrade(int score) {
    // YOUR CODE HERE - 2 lines
}

int Student::getLowestGrade() {
    // YOUR CODE HERE - approximately 7 lines
    return 0; // <--- delete this
}

int Student::getHighestGrade() {
    // YOUR CODE HERE - very similar to getLowestGrade()
    return 0; // <--- delete this
}

----------------

Link to Header.

http://pastebin.com/BHuZxmiJ

Explanation / Answer

string Student::getName() {

return name;

}

int Student::getNumGrades() {

// YOUR CODE HERE

return numGrades;

}

void Student::addGrade(int score) {

grades[numGrades] = score;

numGrades++;

}

int Student::getLowestGrade() {

int min=grades[0];

for (int i=1; i<numGrades; i++) {

if (grades[i] < min) {

min = grades[i];

}

}

return min;

}

int Student::getHighestGrade() {

int max=grades[0];

for (int i=1; i<numGrades; i++) {

if (grades[i] > max) {

max = grades[i];

}

}

return max;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote