/*
 * student.hpp
 *
 * This file defines the interface to the Student class, which is an
 * auxiliary class used by the Registrar_DB class (see registrar.hpp).
 *
 * The Student class describes a single college student.  It allows
 * the student to be created and his/her hair color to be changed at
 * will.  It also supports adding courses to the student's schedule
 * and removing them later.
 *
 * Note to CS70 students: this is an incomplete header file.  You must
 * complete it as you feel appropriate.  Search for "ADD STUFF" to
 * find places you *MAY* need to change.
 */

#ifndef STUDENT_HH_INCLUDED
#define STUDENT_HH_INCLUDED 1

#include <string>
using namespace std;

/*
 * Incomplete class declarations for classes are used but not defined
 * in this file. (For the compiler to understand the interface to the
 * Student class it must know that these classes will exist, but it
 * does not need any additional information about them.)
 */
class Course;

/*
 * Interface to the Student class.
 */
class Student {
public:
    /*
     * Constructors and destructors.  We provide a zero-argument
     * constructor so that arrays of students can be created.  For 
     * the current assignment, no other constructor is needed.
     */
                Student();
                ~Student();
    /*
     * Pseudo-constructor.  This is used to add information to a
     * preexisting student, assuming that the student was created
     * as part of an array.  It is very similar to an assignment
     * operator, which hasn't yet been covered in CS70.
     */
    void	fillInInfo(const string& firstName,
			   const string& lastName, const string& hairColor);
					// Fill in student info
    /*
     * Information functions.
     */
    string	name() const;		// Return student's full name in
					// "last, first" format.
					// See implementation for an
					// explanation of why it
					// doesn't return "const
					// string&"
    bool	hasMaximumLoad() const;
					// True if can't add any more courses

    /*
     * Modification functions.
     */
    void	changeHairColor(const string& newColor);
					// Dye student's hair
    bool	addCourseToSchedule(Course* course);
					// Insert course in schedule;
					// also adds student to course if
					// needed.  Returns true if course
					// was added, false otherwise
					// (e.g., if course was already
					// there, or no room)
    bool	removeCourseFromSchedule(Course* course);
					// Remove course from schedule;
					// also removes student from
					// course if needed.  Returns true
					// if course was removed, false
					// otherwise (e.g., if course
					// wasn't in schedule)
    /*
     * Display functions.
     */
    ostream&	print(ostream& out) const;
					// Produce representation of student
private:
    /*
     * Disable copy/assignment.
     */
                Student(const Student& source);
    Student&	operator=(const Student& source);

    /*
     * Private functions.
     * ADD PSEUDOCODE
     */
    void	dropAllCourses();	// Remove student from all enrollments 

    /*
     * Private data.
     */
    static const int MAX_COURSES_PER_STUDENT = 5;
					// Limit on courses a student can take

    // ADD PSEUDOCODE
    string	fullName_;		// Last name, first name
    string	hairColor_;		// Current color of student's hair
    Course*	schedule_[MAX_COURSES_PER_STUDENT];
					// Pointers to all the courses being
					// taken by this student
};

#endif // STUDENT_HH_INCLUDED


/* Junk to make emacs use the right C++ style when editing this code:
 *   Local Variables:
 *   c-file-style: "stroustrup"
 *   End:
 */
