/*
 * course.hpp
 *
 * This file defines the interface to the Course class, which is an
 * auxiliary class used by the Registrar_DB class (see registrar.hpp).
 *
 * The Course class can track a single course by name.  It allows the
 * course to be created and named, students to be enrolled and
 * deenrolled, and the current course data to be printed.
 *
 * Note to CS70 students: this is an incomplete header file.  You must
 * complete it as you feel appropriate.  Search for "ADD PSEUDOCODE" and
 * "ADD STUFF" to find places you *MAY* need to change.
 */

#ifndef COURSE_HPP_INCLUDED
#define COURSE_HPP_INCLUDED 1

#include <string>
#include <iostream>
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
 * Course class it must know that these classes will exist, but it
 * does not need any additional information about them.)
 */
class Student;


/*
 * Interface to the Course class.
 */
class Course {
public:
    /*
     * Constructors and destructors.  We provide a zero-argument
     * constructor so that arrays of courses can be created.  For
     * the current assignment, no other constructor is needed.
     */
		Course();
                ~Course();

    /*
     * Pseudo-constructor.  This is used to add information to a
     * course after it already exists, assuming that the course
     * 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& department,
			   int courseNumber, const string& meetingTime,
			   int maxEnrollment);
					// Set or change course info

    /*
     * Informational functions.
     */
    bool	isFull() const;
					// Return true if course is at
					// ..maximum enrollment
    bool	isSameAs(const string& testDepartment, int testNumber)
                    const;
					// Return true if course department
					// and number match parameters

    /*
     * Modification functions.
     */
    bool	addStudent(Student* enrollee);
					// Add a student to the course,
					// possibly also adding the course
					// to student's schedule
					// [depending on implementation].
					// Return true if add was
					// successful, false if not done
					// (e.g., student already in
					// course)
    bool	removeStudent(Student* dropper);
					// Remove a student from the course,
					// possibly also removing the
					// course from student's schedule
					// [depending on implementation].
					// Returns true if remove was
					// successful, false otherwise
					// (e.g., student wasn't in the
					// course)
    void	changeMeetingTime(const string& newMeetingTime);
					// Reschedule course

    /*
     * Display functions.
     */
    ostream&	showName(ostream& out) const;
					// Display course name on a stream
    ostream&	print(ostream& out) const;
					// Display all course info on a stream
private:
    /*
     * Disable copy/assignment.
     */
                Course(const Course& source);
    Course&	operator=(const Course& source);

    /*
     * Private functions.
     * ADD PSEUDOCODE
     */

        
    /*
     * Private data.
     * ADD PSEUDOCODE
     */
    string	meetingTime_;		// e.g., "MWF 9"
    int		maxEnrollment_;		// Maximum size of the roster
    Student**	roster_;		// Students enrolled in course
					// kept alphabetized by name
};

#endif // COURSE_HPP_INCLUDED


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