Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/ * * File: Roster.h * * Purpose: This file gives the full definition of the class Roster. * / #ifndef _ _ CSCI 3

/*
* File: Roster.h
*
* Purpose: This file gives the full definition of the class Roster.
*/
#ifndef __CSCI3110_ROSTER__
#define __CSCI3110_ROSTER__
#include
#include "student.h"
using namespace std;
class Roster
{
public:
// a value constructor, the parameter is the course name
// Create an empty roster, i.e. studentNum =0 for
// a specific course
Roster(string courseName);
// This function reads student information from a file
// The parameter is a file name
// post-condition:
// students contains student information read from the file
// studentNum is the number of students read from the file
void readStudentRecord(string filename);
// This function returns the number of students in the class roster
// post-condition: the studentNum value is returned
int GetStudentCount() const;
// This function determines whether there is a student with "id" in the class roster
// post-condition: if there is a student in class with this "id", true is returned
// Otherwise, false is returned
bool isValid(string id) const;
// This function displays all the information of one student, one value per line
// This function also displays the total score and letter grade of the student with the id given
// pre-condition: a valid user id is provided
// post-condition: All information of the student with the given id is displayed, one value per line with label
void ShowOneStudent(string id) const;
// This function prints out all the information (exclude total score and letter grade) for
// all the students in the class
// The information is display in a table format, one student per row
friend ostream & operator<<(ostream& os, const Roster& oneClass);
//*****************************************
//Add your functions here if necessary
//*****************************************
private:
static const int MAX_NUM =90; // The maximum # of students of a class
// Class constant. All objects share the same copy
string courseName; // THe name of the course
int studentNum; // Actual Student #
Student students[MAX_NUM]; // The array of student objects
};
#endif

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago