Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 09 / task1 (not finished) / Student.cpp
diff options
context:
space:
mode:
1 files changed, 0 insertions, 45 deletions
-rw-r--r--Sem. 09/task1 (not finished)/Student.cpp45
diff --git a/Sem. 09/task1 (not finished)/Student.cpp b/Sem. 09/task1 (not finished)/Student.cpp
deleted file mode 100644
index 99d26dc..0000000
--- a/Sem. 09/task1 (not finished)/Student.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "Student.h"
-
-Student::Student(const char* name, size_t fn)
-{
- setName(name);
- setFn(fn);
-}
-
-void Student::setFn(size_t fn)
-{
- if (fn < 80000 || fn > 83000)
- throw std::exception("Invalid fn");
-
- this->fn = fn;
-}
-void Student::setName(const char* name)
-{
- if (strlen(name) > MAX_NAME_LENGTH)
- throw std::exception("Name is too long!");
-
- strcpy(this->name, name);
-}
-
-size_t Student::getFN() const
-{
- return fn;
-}
-const char* Student::getName() const
-{
- return name;
-}
-
-void Student::addGrade(const char* taskName, size_t grade)
-{
- if (gradesCount == MAX_GRADES_COUNT)
- throw std::exception("Error! Too many grades!");
-
- Grade currentGrade(taskName, grade);
- grades[gradesCount++] = currentGrade;
-}
-
-void Student::print() const
-{
- std::cout << name << " " << fn << std::endl;
-} \ No newline at end of file