d05 ex01 form ok
This commit is contained in:
Binary file not shown.
@@ -15,15 +15,6 @@ public:
|
||||
~Bureaucrat();
|
||||
Bureaucrat & operator=( Bureaucrat const & rhs );
|
||||
|
||||
class GradeTooHighException : public std::exception {
|
||||
public:
|
||||
const char * what() const throw();
|
||||
};
|
||||
class GradeTooLowException : public std::exception {
|
||||
public:
|
||||
const char * what() const throw();
|
||||
};
|
||||
|
||||
std::string getName() const;
|
||||
int getGrade() const;
|
||||
|
||||
@@ -38,6 +29,11 @@ protected:
|
||||
private:
|
||||
|
||||
Bureaucrat();
|
||||
|
||||
class GradeTooHighException : public std::exception {
|
||||
const char * what() const throw();};
|
||||
class GradeTooLowException : public std::exception {
|
||||
const char * what() const throw();};
|
||||
};
|
||||
|
||||
std::ostream & operator<<(std::ostream & o, Bureaucrat const & rhs);
|
||||
|
||||
@@ -80,8 +80,8 @@ void Bureaucrat::gradeDown() {
|
||||
*********************************************/
|
||||
|
||||
const char * Bureaucrat::GradeTooHighException::what() const throw() {
|
||||
return ("grade higher than 1");
|
||||
return (B_RED "grade higher than 1" RESET);
|
||||
}
|
||||
const char * Bureaucrat::GradeTooLowException::what() const throw() {
|
||||
return ("grade lower than 150");
|
||||
return (B_RED "grade lower than 150" RESET);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user