Full Gradebook This quest is going to improve upon several of the previous quest
ID: 3733864 • Letter: F
Question
Full Gradebook This quest is going to improve upon several of the previous quests. We are now going to keep track of up to 30 student names and grades for up to 10 assignments. We should also bring in and adjust the code from the Quest 3 assignment in order to be able to curve a column of grades. You will need an array of strings for the student names and a two dimensional array of ints for the grades. Grades are stored as percents You will also need variables to keep track of the number of students and number of assignments already entered. Your programs should also ensure that no more than 30 students are added and no more than 10 assignments. The program should do the following 1. Ask for the number of students in the class 2. Ask for the name of each student and add it to the array. Number of students: 10 Name of student 1: Doug Name of student 2: Frank Name of student 10: Jan 3. Clear the screen 4. NEATLY display the list of students andExplanation / Answer
Please find the answer of the above mentioned question.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
studentreport.cpp
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include<string>
#include<stdlib.h>
#include<sstream>
using namespace std;
#define N_STUDENT 10
int main ()
{
//string mysrt;
string assgnment;
int n,nc=0;
int selection;
int student_number; // Student number of student
string studnetname[30]; // Name of student
string GradeArray[30][3]; //Address of Studnet
cout <<"Enter Student Number: ";
cin>>n;
while(n!= 0){
cout << "Enter Student Name: ";
cin>>studnetname[nc];
GradeArray[nc][0] = studnetname[nc].size();
n--;
nc++;
}
//system("CLS");
system("clear");
for(int i= 0; i < nc; i++)
cout << "Name of the student is : " << studnetname[i] << " and the grade is : "<< GradeArray[i][0].size()<< endl;
do{
system("clear");
cout<<"Do you want to add a (s)tudent (a)ssignment (c)urve a grade (q)uit ?";
cin>>selection;
if(selection==1){
system("clear");
nc+=1;
cout << "Enter Student Name: ";
cin>>studnetname[nc];
for(int j=0;j<3;j++){
cout << "Enter Student "<<j+1<< " Grade in assignment: ";
cin>>GradeArray[nc][j];
}
}
if(selection==2){
system("clear");
for(int i=0;i<nc;i++){
cout << "Student Name: "<<studnetname[i];
cout<<"Enter the grade of student : ";
cin>>GradeArray[i][0];
}
}
if(selection==3){
cout<<"Enter the assignment";
cin>>assgnment;
}
if(selection==4){
return 0;
}
}while(selection!=4);
return 0;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Happy Coding
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.