#include "Gradebook.h" using std::string; using std::vector; //------------------------------------------------------------------------- Gradebook::Gradebook() { } //------------------------------------------------------------------------- Gradebook::~Gradebook() { } //------------------------------------------------------------------------- void Gradebook::addStudent( const Student& student ) { students.push_back( student ); } //------------------------------------------------------------------------- Student Gradebook::findStudent( const string& name ) const { for ( unsigned int i = 0; i < students.size(); i++ ) { if ( name == students[i].name() ) { return students[i]; } } throw StudentNotFound(); }