Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ class definition called SIMPLEST_GRADES defined as follows: class SIMPLEST_GRADES { public: // public methods for this class SIMPLEST_GRADES (int, int) ; //

Write a C++ class definition called SIMPLEST_GRADES defined as follows:

class SIMPLEST_GRADES {

public: // public methods for this class

SIMPLEST_GRADES (int, int) ; // constructor;

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

// create an object called g with x students each with y exams ;

void SIMPLEST_LIST (int) ; // 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_AVE (int) ; // another method ;

// example usage : e.SIMPLEST_AVE (x) ;

// find the average grade for exam x ;

// returns no values ;

protected: // protected var to be used by this class and its derivative

// classes only (not from main)

int n ; // no of students ;

int e ; // no of exams ;

int id [20] ; // an integer array to hold the ids ;

int exam_grades [20] [3] ; // 2-dim array to hold exam grades ;

} ;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

Identify the types of informal reports.

Answered: 1 week ago

Question

Write messages that are used for the various stages of collection.

Answered: 1 week ago