Answer to Question #257374 in C++ for Chiran

Question #257374
You are required to develop a simple result sheet generator for an Advanced level class. Assume that class consists of 30 students and each student follows a subject. Implement your result sheet generator as a menu driven C++ application. Your program should read 30 students marks from the keyboard and print mark, grade sheet and summary sheet as per the details given below. i. Draw a top-level design diagram for the above problem. ii. Write a method named ‘main_menu ()’ to display the following menu items ----------------------- Result Sheet Generator ----------------------- [1] Add New Student Marks [2] Print Mark Sheet [3] Print Grade Sheet [4] Print Summary Sheet [5] Exit iii. Use an array to store all marks of the 30 students. iv. Write a method to add_new_marks () to add marks for the 30 students. v. Validate your input range from 0- 100 marks.
1
Expert's answer
2021-10-27T16:21:51-0400
#include <iostream>


using namespace std;
class myStudent{
    public:
void main_menu(){
    cout<<"-----Result sheet generator----"<<endl;
    cout<<" [1]Add new student"<<endl;
    cout<<" [2]Add new student marks"<<endl;
    cout<<" [1]Print grade sheet"<<endl;
    cout<<" [5]Exit"<<endl;
}
void add_new_marks(){
    int i=0;
    int marks[i];
    char grade;
    for(i=0;i<=30;i++){
cout<<"enter student marks"<<endl;
 for(i=1;i<=30;i++)
    {
        cout<<"Enter students marks"<<endl;
        cin>>marks[i];
        if (marks[i]>70 &&marks[i]<=100)
        {
            grade='A';
        }
        if (marks[i]>60 &&marks[i]<=69)
        {
            grade='B';
        }
        if (marks[i]>50 &&marks[i]<=59)
        {
            grade='C';
        }
        if (marks[i]>40 &&marks[i]<=49)
        {
            grade='D';
        }
        if (marks[i]>0 &&marks[i]<=39)
        {
            grade='F';
        }


}
}
};




int main()
{
  myStudent s;
  s.main_menu();
  s.add_new_marks();
  return 0;
}
};

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS