#ifndef GRADES
#define GRADES

#include <fstream.h> // for ifstream

class gradedThing;

// Lists of grades are provided through the student class.

class grade {
public:
  // fills the gradeFor slot with the gradedThing parameter,
  // fills the score slot by reading from the input stream
  grade(ifstream,gradedThing*); 
  // fills the gradeFor slot with the gradedThing parameter,
  // fills the score slot by prompting the user
  grade(gradedThing*);

  // returns true (nonzero) if this grade is a gradeFor the
  // gradedThing that the supplied parameter points to, 
  // false (zero) otherwise.
  int compareGradeFor(gradedThing*);
  // computes and returns the weighted score
  float weightedScore();
  // returns the score
  int getScore();

  // will prompt the user for a new score, and change
  // the value of that slot
  void changeGrade(); 

private:
  int score;
  gradedThing* gradeFor;
};

class student;

// You should not need to use this class
class gradeElement {
public:
  gradeElement(grade*); // take new student always append
  ~gradeElement();
  
  friend student;
  
private:
  gradeElement* next;
  grade* data;
};

#endif

