ex03 finished
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "Bureaucrat/Bureaucrat.hpp"
|
||||
#include "AForm/AForm.hpp"
|
||||
#include "Intern/Intern.hpp"
|
||||
#include "ShrubberyCreationForm/ShrubberyCreationForm.hpp"
|
||||
#include "RobotomyRequestForm/RobotomyRequestForm.hpp"
|
||||
#include "PresidentialPardonForm/PresidentialPardonForm.hpp"
|
||||
@@ -22,15 +23,18 @@ int main()
|
||||
// RobotomyRequestForm
|
||||
srand(time(NULL));
|
||||
|
||||
std::cout << "---- ex01 tests ----" << std::endl;
|
||||
RobotomyRequestForm form("home");
|
||||
std::cout << "---- ex03 tests ----" << std::endl;
|
||||
Bureaucrat angel("Angel", 1);
|
||||
Intern intern;
|
||||
|
||||
try {
|
||||
Bureaucrat angel("Angel", 1);
|
||||
AForm* form = intern.makeForm("shrubbery creation", "home");
|
||||
|
||||
angel.executeForm(form);
|
||||
angel.signForm(form);
|
||||
angel.executeForm(form);
|
||||
angel.executeForm(*form);
|
||||
angel.signForm(*form);
|
||||
angel.executeForm(*form);
|
||||
|
||||
delete form;
|
||||
} catch (std::exception &e) {
|
||||
std::cout << e.what() << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user