assgn9/StudentDB.cpp
bool StudentDB::check_lastname(string lastname) {
//cout<<"ln pre for"<<endl;
	for (int i=0; i < lastname.size(); i++) {
		// Are there any non-alphabetic characters?
		if (!isalpha(lastname[i])) {
			// Yes, ths last name is invalid
//cout<<"ln if"<<endl;
			return false;
		}
//cout<<"ln for"<<endl;
	}
	return true;
}
/**
 * Function to check it the student's last name is valid
 * @param lastname is the last name of the student
 * @return true if the last name includes only alphabetic characters;
 *	else, return false.
 *	Hence, names of people that include non-alphabetic characters
 *	will be considered invalid. This is a current program limitation
 *	given the assignment's specification. It should allow names with
 *	special characters to be valid, e.g. some European names with
 *	accented characters
 */
Function to check it the student's last name is valid
@param lastname is the last name of the student
@return true if the last name includes only alphabetic characters;
else, return false.
Hence, names of people that include non-alphabetic characters
will be considered invalid. This is a current program limitation
given the assignment's specification. It should allow names with
special characters to be valid, e.g. some European names with
accented characters
Function to check it the student ' s last name is valid @param lastname is the last name of the student @return true if the last name includes only alphabetic characters ; else return false . Hence names of people that include non - alphabetic characters will be considered invalid . This is a current program limitation given the assignment ' s specification . It should allow names with special characters to be valid e . g . some European names with accented characters
bool StudentDB::check_lastname(string lastname) {
	for (int i=0; i < lastname.size(); i++) {
		if (!isalpha(lastname[i])) {
			return false;
		}
	}
	return true;
}
bool StudentDB :: check_lastname ( string lastname ) { for ( int i = 0 ; i < lastname . size ( ) ; i ++ ) { if ( ! isalpha ( lastname [ i ] ) ) { return false ; } } return true ; }
Function to check it the student's last name is valid
 @param lastname is the last name of the student
 @return true if the last name includes only alphabetic characters;
      else, return false.
Function to check it the student ' s last name is valid @param lastname is the last name of the student @return true if the last name includes only alphabetic characters ; else return false .
//cout<<"ln pre for"<<endl; // Are there any non-alphabetic characters? // Yes, ths last name is invalid //cout<<"ln if"<<endl; //cout<<"ln for"<<endl;