/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Form.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/06/26 16:12:05 by narnaud #+# #+# */ /* Updated: 2022/06/27 01:05:27 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include "Form.hpp" Form::Form(const string name, const int signGrade, const int exeGrade) throw (Form::GradeTooHighException, Form::GradeTooLowException): _name(name){ if (signGrade < 1 || exeGrade < 1) throw Form::GradeTooHighException; if (signGrade > 150 || exeGrade > 150) throw Form::GradeTooLowException; _signGrade = signGrade; _exeGrade = exeGrade; } const string Form::getName(void) const { return (_name); } const int Form::getSignGrade(void) const { return (_signGrade); } const int Form::getExeGrade(void) const { return (_exeGrade); }