Removed isSigned param when initializing Form, because it should always start as FALSE
This commit is contained in:
@@ -31,7 +31,7 @@ class Form
|
||||
Form& operator=(const Form &other);
|
||||
~Form();
|
||||
|
||||
Form(std::string name, bool isSigned, int gradeToSign, int gradeToExecute);
|
||||
Form(std::string name, int gradeToSign, int gradeToExecute);
|
||||
|
||||
std::string getName() const;
|
||||
bool getIsSigned() const;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: hadi <hadi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/02/16 22:32:41 by hadi #+# #+# */
|
||||
/* Updated: 2026/02/17 09:48:55 by hadi ### ########.fr */
|
||||
/* Updated: 2026/02/17 16:29:26 by hadi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -18,7 +18,7 @@ int main()
|
||||
std::cout << "---- ex01 tests ----" << std::endl;
|
||||
|
||||
try {
|
||||
Form form("AngelForm", false, 139, 5);
|
||||
Form form("AngelForm", 139, 5);
|
||||
Bureaucrat angel("Angel", 140);
|
||||
|
||||
std::cout << form << std::endl;
|
||||
|
||||
@@ -31,7 +31,7 @@ class AForm
|
||||
AForm& operator=(const AForm &other);
|
||||
~AForm();
|
||||
|
||||
AForm(std::string name, bool isSigned, int gradeToSign, int gradeToExecute);
|
||||
AForm(std::string name, int gradeToSign, int gradeToExecute);
|
||||
|
||||
std::string getName() const;
|
||||
bool getIsSigned() const;
|
||||
@@ -40,6 +40,8 @@ class AForm
|
||||
|
||||
void beSigned(const Bureaucrat &br);
|
||||
|
||||
virtual void execute(Bureaucrat const &executor) = 0;
|
||||
|
||||
class GradeTooLowException : public std::exception {
|
||||
public:
|
||||
virtual const char *what() const throw();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: hadi <hadi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/02/16 22:32:41 by hadi #+# #+# */
|
||||
/* Updated: 2026/02/17 09:56:07 by hadi ### ########.fr */
|
||||
/* Updated: 2026/02/17 16:24:37 by hadi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -18,12 +18,7 @@ int main()
|
||||
std::cout << "---- ex01 tests ----" << std::endl;
|
||||
|
||||
try {
|
||||
AForm form("AngelForm", false, 139, 5);
|
||||
Bureaucrat angel("Angel", 140);
|
||||
|
||||
std::cout << form << std::endl;
|
||||
angel.signForm(form);
|
||||
std::cout << form << std::endl;
|
||||
|
||||
} catch (std::exception &e) {
|
||||
std::cout << e.what() << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user