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

Building an application using your Student ADT (20 pts) We’ve added 5 new tasks

ID: 3667469 • Letter: B

Question

Building an application using your Student ADT (20 pts)

We’ve added 5 new tasks to the list,

1. create an array of 10 students student references with initial values received from the console

2. print out each student to the console, one at a time

3. calculate the class average and print out your result 4. (new) Make one change to any student’s assignment, and one change to any student’s midterm, and one change to any student’s final exam.

5. (new) display the student records that changed.

6. (new) Recompute the class average, and display the result.

7. (new) Give every student 5 more marks on Assignment 5.

8. (new) Recompute the class average, and display the result.

Maybe your app needs a function to calculate the class average for any size class. • The array for 10 students should be an array of references! . You may use the heap or the stack to store these references. • Do not try to name your array "class" because "class" is a keyword in C++.

Explanation / Answer

#include<iostream>
using namespace std;

class Student
{
char name[20];
int marks;

public :
    Student()
    {
    cout<<"Welcome to student management system"
    }

void getdata()
    {
        cout<<" enter the student roll no.";
        cin>>roll;
        cout<<" enter the student name";
        cin>>name;
        cout<< enter ther student address";
        cin>>add;
        cout<<" enter the student city";
        cin>>city;
    }
    void putdata()
    {
        cout<," the student roll no:"<<roll;
        cout<<" the student name:"<<name;
        cout<<" the student coty:"<<city;
    }



};


class mrks: public student
{
    int sub1;
    int sub2;
    int sub3;
    int per;
    public: void input()
    {
        getdata();
        cout<<" enter the marks1:"
        cin>>sub1:
        cout<<" enter the marks2:";
        cin>>sub2;
        cout<< enter the marks3:";
        cin>>sub3;
    }
    void output()
    {
        putdata();
        cout<<" marks1:"<<sub1;
        cout<<" marks2:"<<sub2;
        cout<<" marks3:"<<sub3;
    }
    void calculate ()
    {
        per= (sub1+sub2+sub3)/3;
        cout<<" tottal percentage"<<per;
    }
};

void main()
{
    marks m1[25];
    int ch;
    int count=0;
    do
    {
        cout<< 1.input data";
        cout<< 2.output data";
        cout<< 3. Calculate percentage";
        cout<< 4.exit";
        cout<< enter the choice";
        cin>>ch;
        switch (ch)
        {
            case 1:
            m1.input();
            count++;
            break;

                        case2:
            m1.output();
            break;

            case3:
            m1.calculate();
            break;
        }
    } while (ch!=4);
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote