Answer to Question #259155 in C++ for umangana

Question #259155

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.


1
Expert's answer
2021-10-30T23:55:42-0400
#include <bits/stdc++.h>

using namespace std;
class Student
{
public:
    void 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_marks()
    {
        int i = 0;
        int marks_list[i];
        char grade_letter;
        for (i = 0; i <= 30; i++)
        {
            cout << "Enter the student mark" << endl;
            for (i = 1; i <= 30; i++)
            {
                cout << "Enter the student mark" << endl;
                cin >> marks_list[i];
                if (marks_list[i] > 70 && marks_list[i] <= 100)
                {
                    grade_letter = 'A';
                }
                if (marks_list[i] > 60 && marks_list[i] <= 69)
                {
                    grade_letter = 'B';
                }
                if (marks_list[i] > 50 && marks_list[i] <= 59)
                {
                    grade_letter = 'C';
                }
                if (marks_list[i] > 40 && marks_list[i] <= 49)
                {
                    grade_letter = 'D';
                }
                if (marks_list[i] > 0 && marks_list[i] <= 39)
                {
                    grade_letter = 'F';
                }
            }
        }
    };


    int main()
    {
        Student s;
        s.menu();
        s.add_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