assgn10/Undergraduate.cpp
void Undergraduate::set_major (string major_title) {
	if(check_major(major_title)) {
		major = major_title;
	}else{
		major = major_title.substr(0,MAXIMUM_CHARACTERS_OF_MAJOR);
	}
}
// Modifier/accessor functions...
/**
 * Function to assign/update the major of the undergraduate student
 * Assume that all Undergraduate students have to select a major
 * and minor each
 * @param major_title is the title of the Undergraduate student's major
 * @precondition major_title must be a valid major title;
 *	it must contain no whitespace and be less than 6 characters
 * @return nothing
 */
Modifier/accessor functions
Function to assign/update the major of the undergraduate student
Assume that all Undergraduate students have to select a major
and minor each
@param major_title is the title of the Undergraduate student's major
@precondition major_title must be a valid major title;
it must contain no whitespace and be less than 6 characters
@return nothing
Modifier / accessor functions Function to assign / update the major of the undergraduate student Assume that all Undergraduate students have to select a major and minor each @param major_title is the title of the Undergraduate student ' s major @precondition major_title must be a valid major title ; it must contain no whitespace and be less than 6 characters @return nothing
void Undergraduate::set_major (string major_title) {
	if(check_major(major_title)) {
		major = major_title;
	}else{
		major = major_title.substr(0,MAXIMUM_CHARACTERS_OF_MAJOR);
	}
}
void Undergraduate :: set_major ( string major_title ) { if ( check_major ( major_title ) ) { major = major_title ; } else { major = major_title . substr ( 0 , MAXIMUM_CHARACTERS_OF_MAJOR ) ; } }
Modifier/accessor functions...
 Function to assign/update the major of the undergraduate student
 Assume that all Undergraduate students have to select a major
 and minor each
 @param major_title is the title of the Undergraduate student's major
 @precondition major_title must be a valid major title;
      it must contain no whitespace and be less than 6 characters
 @return nothing
Modifier / accessor functions ... Function to assign / update the major of the undergraduate student Assume that all Undergraduate students have to select a major and minor each @param major_title is the title of the Undergraduate student ' s major @precondition major_title must be a valid major title ; it must contain no whitespace and be less than 6 characters @return nothing