/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* RobotomyRequestForm.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/06/27 10:17:52 by narnaud #+# #+# */ /* Updated: 2022/06/27 14:43:34 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include "RobotomyRequestForm.hpp" RobotomyRequestForm::RobotomyRequestForm (const string target): Form("RobotomyRequestForm", 72, 45, target) { cout << "RobotomyRequestForm parameter constructor called" << endl; } RobotomyRequestForm::~RobotomyRequestForm (void) { cout << "RobotomyRequestForm default destructor called" << endl; } void RobotomyRequestForm::run(void) const { int r = rand(); cout << "ratatttaatata" << endl; sleep(1); cout << "ratata tatata" << endl; sleep(1); cout << "ratata" << endl; sleep(1); if (r % 2) cout<< _target << " have been robotomized" << endl; else cout << _target << " robotomization failed" << endl; }