/* * Note to CS70 students: this is an incomplete source file. You must * complete it as you feel appropriate. Search for "ADD STUFF" to * find places you *MAY* need to change. * * Note that many comments are missing. We have not provided "ADD * STUFF" hints for missing comments. */ /* * Name: Geoff Kuenning * Course: CS 70, Spring 2004 * Assignment #3 */ #include "course.hh" #include "registrar.hh" #include "student.hh" #include #include using namespace std; /* * Table of Contents: the following routines are defined in this file: * * Registrar_DB::Registrar_DB(int maxStudents_, * int maxCourses_); * Registrar_DB::~Registrar_DB(); * bool Registrar_DB::canAcceptStudents() const; * // True if room for more students * bool Registrar_DB::canAcceptCourses() const; * // True if room for more courses * bool Registrar_DB::newStudent(const string& firstName, * const string& lastName, const string& hairColor); * // Add a new student to DB * bool Registrar_DB::newCourse(const string& department, * int courseNumber, const string& meetingTime, * int maxEnrollment); * // Add a new course to DB * Student* Registrar_DB::findStudentByName( * const string& firstName, const string& lastName) * const; * // Given a student name, find him/her * Course* Registrar_DB::findCourseByName( * const string& department, int courseNumber) * const; * // Given a course name, find it * ostream& Registrar_DB::showStudents(ostream& stream); * // Display all students * ostream& Registrar_DB::showCourses(ostream& stream); * // Display all courses */ Registrar_DB::Registrar_DB( int maxStudents_, int maxCourses_) // ADD STUFF (PSEUDOCODE NOT NEEDED) { // ADD PSEUDOCODE } Registrar_DB::~Registrar_DB() { // ADD STUFF (PSEUDOCODE NOT NEEDED) } bool Registrar_DB::canAcceptStudents() // True if room for more students const { // ADD STUFF (PSEUDOCODE NOT NEEDED) } bool Registrar_DB::canAcceptCourses() // True if room for more courses const { // ADD STUFF (PSEUDOCODE NOT NEEDED) } bool Registrar_DB::newStudent( const string& firstName, const string& lastName, const string& hairColor) { // ADD PSEUDOCODE } bool Registrar_DB::newCourse( const string& department, int courseNumber, const string& meetingTime, int maxEnrollment) { // ADD PSEUDOCODE } Student* Registrar_DB::findStudentByName( const string& firstName, const string& lastName) const { // ADD PSEUDOCODE } Course* Registrar_DB::findCourseByName( const string& department, int courseNumber) const { // ADD PSEUDOCODE } ostream& Registrar_DB::showStudents( // Display all students ostream& stream) { // ADD STUFF (PSEUDOCODE NOT NEEDED) return stream; } ostream& Registrar_DB::showCourses( // Display all courses ostream& stream) { // ADD STUFF (PSEUDOCODE NOT NEEDED) return stream; }