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
|
#include <iostream>
#include "Students.h"
bool Students::add_student(std::string name, int birth_day, int birth_month, int birth_year, double grade_bac,
double grade1_ex1, double grade2_ex1, double grade3_ex1, double grade1_ex2,
double grade2_ex2, double grade3_ex2);
bool Students::add_student(std::string name, int birth_day, int birth_month, int birth_year, double grade_bac,
double grade1_ex1, double grade2_ex1, double grade3_ex1, double grade1_ex2,
double grade2_ex2, double grade3_ex2)
{
if(vect.add_student(name, birth_day, birth_month, birth_year, grade_bac, grade1_ex1, grade2_ex1, grade3_ex1,
grade1_ex2, grade2_ex2, grade3_ex2)){
std::cout << name << " was added!" << std::endl;
} else {
std::cout << name << " already exists!" << std::endl;
}
}
int main() {
Students my_stud;
my_stud.display();
add_student("mark", 20, 04, 1998, 9.50, 8.75, 8.95, 9.00, 7.50, 6.30, 7.00);
return 0;
}
|