Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 09 / task1 (not finished) / Student.cpp
diff options
context:
space:
mode:
Commit8cf1283a4ffb9fe1901c29c087fa376de82726af (patch)
Author
 angeld55 <angel_dimitriev@abv.bg>
2022-02-19 23:30:52 +0200
Committer
 angeld55 <angel_dimitriev@abv.bg>
2022-02-19 23:30:52 +0200
Filesabdfe6bf526100dcce87a88563100e02adf7605e /Sem. 09/task1 (not finished)/Student.cpp
Object-oriented_programming_FMI-8cf1283a4ffb9fe1901c29c087fa376de82726af.tar
Object-oriented_programming_FMI-8cf1283a4ffb9fe1901c29c087fa376de82726af.tar.gz
Object-oriented_programming_FMI-8cf1283a4ffb9fe1901c29c087fa376de82726af.zip
Parentd73a7ec225516657dec74472a0491330e9999217 (diff)
clean up
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