// student.h     Student_C class, inherits from Person_C
// P.Conrad for CISC220 06J

#ifndef STUDENT_H
#define STUDENT_H

#include "person.h"


class Student_C: public Person_C
{
 public:
  Student_C(const char * const theFname,
	       const char * const theLname,
	       const int theId,
	       const char * const theMajor,
	       const double theGPA)
    : Person_C(theFname,theLname,theId)
    {
      allocateAndCopy(major,theMajor);
    }
  
  const char * const getMajor() const { return major; }
  double getGPA() const { return gpa; }

  void setMajor(const char * const theMajor)
    { delete [] major; allocateAndCopy(major,theMajor); }
  void setGPA(const double theGPA) { gpa = theGPA; }
  
  // big three

  Student_C(const Student_C & orig);
  Student_C & operator =(const Student_C & right);
  ~Student_C();

  void print(std::ostream & out = std::cout) const;

 private:
  char * major;
  double gpa;

};


#endif // STUDENT_H
