-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPresidentialPardonForm.cpp
More file actions
34 lines (27 loc) · 1.67 KB
/
PresidentialPardonForm.cpp
File metadata and controls
34 lines (27 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* PresidentialPardonForm.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zelhajou <zelhajou@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/12/26 14:11:38 by zelhajou #+# #+# */
/* Updated: 2024/12/30 16:36:34 by zelhajou ### ########.fr */
/* */
/* ************************************************************************** */
#include "PresidentialPardonForm.hpp"
PresidentialPardonForm::PresidentialPardonForm() : AForm("PresidentialPardon", 25, 5), _target("default") {}
PresidentialPardonForm::PresidentialPardonForm(const std::string &target) : AForm("PresidentialPardon", 25, 5), _target(target) {}
PresidentialPardonForm::PresidentialPardonForm(const PresidentialPardonForm &src) : AForm(src), _target(src._target) {}
PresidentialPardonForm::~PresidentialPardonForm() {}
PresidentialPardonForm &PresidentialPardonForm::operator=(const PresidentialPardonForm &src)
{
if (this != &src)
AForm::operator=(src);
return *this;
}
void PresidentialPardonForm::execute(Bureaucrat const &executor) const
{
checkExecution(executor);
std::cout << _target << " has been pardoned by Zaphod Beeblebrox." << std::endl;
}