diff --git a/ex01/Form/Form.hpp b/ex01/Form/Form.hpp index 2a60f04..4dcfb3b 100644 --- a/ex01/Form/Form.hpp +++ b/ex01/Form/Form.hpp @@ -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; diff --git a/ex01/main.cpp b/ex01/main.cpp index c5ea359..0a8f0ae 100644 --- a/ex01/main.cpp +++ b/ex01/main.cpp @@ -6,7 +6,7 @@ /* By: hadi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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; diff --git a/ex02/AForm/AForm.hpp b/ex02/AForm/AForm.hpp index b7bc942..eeb29dd 100644 --- a/ex02/AForm/AForm.hpp +++ b/ex02/AForm/AForm.hpp @@ -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(); diff --git a/ex02/main.cpp b/ex02/main.cpp index 81b7573..b44bfea 100644 --- a/ex02/main.cpp +++ b/ex02/main.cpp @@ -6,7 +6,7 @@ /* By: hadi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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;