Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

my assignment is to log in the my college provided server (my hw account that i have to do my hw on) which is provide on "screen shot XXXXXXXXXXat XXXXXXXXXXPM.png" and then finish the two blank space...

1 answer below »
my assignment is to log in the my college provided server (my hw account that i have to do my hw on) which is provide on "screen shot XXXXXXXXXXat XXXXXXXXXXPM.png" and then finish the two blank space which provide on the two files "screen shot XXXXXXXXXXat XXXXXXXXXXPM.png" and "screen shot XXXXXXXXXXat XXXXXXXXXXPM.png" and the question is provide on the following two file "HW_1 1.pdf" and "HW_1 2.pdf". To summarize, our prof wants us to write a code following the question on the file i provide and comes out with a result that matches the file "out_0_expected_1.txt“ - "out_0_expected_5.txt". if any question, just email me.
Answered Same Day Feb 10, 2021

Solution

Sudipta answered on Feb 11 2021
149 Votes
# include # include # include # include # include
its/stdc++.h
using namespace std;
fstream out;
class SIMPLEST_GRADES {
    
    protected:    
protected var to be used by this class and its derivative
        int n;    
no of students ;
        int e;    
no of exams ;
        int *id;    
an integer a
ay to hold the ids ;
        int **exam_grades;    
2-dim a
ay to hold exam grades ;
    
public methods for this class
    public:
        SIMPLEST_GRADES(int ,int, int* ,int** );
        void SIMPLEST_LIST(int );
        void SIMPLEST_AVE(int );
};
constructor;

example usage : g.SIMPLEST_GRADES (x,y) ;

create an object called g with x students each with y exams ;
SIMPLEST_GRADES::SIMPLEST_GRADES(int n,int e,int* id,int** grades){
    this->n=n;
    this->e=e;
    this->id=id;
    this->exam_grades=grades;
}

a method ;

example usage : g.SIMPLEST_LIST (x) ;

if x is 1, list the student ids ;

if x is 2, list the student ids and exam grades;

if x is -1, list the student ids in reverse order ;

if x is -2, list the student ids and exam grades in reverse order ;

return no values ;
void SIMPLEST_GRADES::SIMPLEST_LIST(int x){
    out.open("output.txt",ios::out);
    switch(x){
        case 1:
            out
"START SIMPLEST_LIST"
endl;
            out
"STUDENT IDS"
endl;
            for(int student=0;student                out
id[student]
endl;
            }
            out
"END SIMPLEST_LIST"
endl;
            
eak;
        case...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here