You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

37 lines
1.4 KiB

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Form.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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);
}