From 7104c90385c02473bba9880b0fcd28ffbf1940bc Mon Sep 17 00:00:00 2001 From: Justsvetoslavov Date: Mon, 17 Jan 2022 21:47:35 +0200 Subject: Add Struct tasks. --- pract_SI/Pract. 10/task1/Student.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 pract_SI/Pract. 10/task1/Student.cpp (limited to 'pract_SI/Pract. 10/task1/Student.cpp') diff --git a/pract_SI/Pract. 10/task1/Student.cpp b/pract_SI/Pract. 10/task1/Student.cpp new file mode 100644 index 0000000..06cf89a --- /dev/null +++ b/pract_SI/Pract. 10/task1/Student.cpp @@ -0,0 +1,18 @@ +#include "pch.h" +#include "Student.h" +#include + +float Student::calculateFinalGrade() //среден успех за годината. +{ + return (GradeFirstTerm + GradeSecondTerm) / 2; +} + +bool Student::checkBirthdate(unsigned _year) // роден преди определена година. +{ + return year < _year; +} + +void Student::enterData() +{ + std::cin >> name >> adress >> year >> GradeFirstTerm >> GradeSecondTerm; +} \ No newline at end of file -- cgit v1.3.1-23-gd82d