uni

University stuff
git clone git://git.christosmarg.xyz/uni-assignments.git
Log | Files | Refs | README | LICENSE

commit f65818528b9b219a4bee755bd540771dcf938f62
parent 39d756e8712de01bfc042f334e7da8c910f8ccb0
Author: Christos Margiolis <christos@margiolis.net>
Date:   Sat, 23 May 2020 02:08:41 +0300

removed getters

Diffstat:
Massignment-2.5-spreadsheets/bin/spreadsheets | 0
Dassignment-2.5-spreadsheets/obj/course.o | 0
Massignment-2.5-spreadsheets/obj/datahandler.o | 0
Massignment-2.5-spreadsheets/obj/main.o | 0
Dassignment-2.5-spreadsheets/obj/student.o | 0
Dassignment-2.5-spreadsheets/src/course.cpp | 4----
Massignment-2.5-spreadsheets/src/course.h | 11+++--------
Massignment-2.5-spreadsheets/src/datahandler.cpp | 12++++++------
Dassignment-2.5-spreadsheets/src/student.cpp | 6------
Massignment-2.5-spreadsheets/src/student.h | 11+++--------
10 files changed, 12 insertions(+), 32 deletions(-)

diff --git a/assignment-2.5-spreadsheets/bin/spreadsheets b/assignment-2.5-spreadsheets/bin/spreadsheets Binary files differ. diff --git a/assignment-2.5-spreadsheets/obj/course.o b/assignment-2.5-spreadsheets/obj/course.o Binary files differ. diff --git a/assignment-2.5-spreadsheets/obj/datahandler.o b/assignment-2.5-spreadsheets/obj/datahandler.o Binary files differ. diff --git a/assignment-2.5-spreadsheets/obj/main.o b/assignment-2.5-spreadsheets/obj/main.o Binary files differ. diff --git a/assignment-2.5-spreadsheets/obj/student.o b/assignment-2.5-spreadsheets/obj/student.o Binary files differ. diff --git a/assignment-2.5-spreadsheets/src/course.cpp b/assignment-2.5-spreadsheets/src/course.cpp @@ -1,4 +0,0 @@ -#include "course.h" - -Course::Course(const lab::xstring& code, const lab::xstring& name) - :code(code), name(name) {} diff --git a/assignment-2.5-spreadsheets/src/course.h b/assignment-2.5-spreadsheets/src/course.h @@ -3,17 +3,12 @@ #include "xstring.h" -class Course +struct Course { - private: lab::xstring code; lab::xstring name; - - public: - Course(const lab::xstring& code, const lab::xstring& name); - - constexpr const lab::xstring& get_code() const {return code;} - constexpr const lab::xstring& get_name() const {return name;} + Course(const lab::xstring& code, const lab::xstring& name) + :code(code), name(name) {} }; #endif /* COURSE_H */ diff --git a/assignment-2.5-spreadsheets/src/datahandler.cpp b/assignment-2.5-spreadsheets/src/datahandler.cpp @@ -121,17 +121,17 @@ DataHandler::miss(lab::xstring id, lab::xstring code, float grade) { bool found = false; for (const auto& grd : grds) - if (grd.first->get_code() == eqvs[code]) + if (grd.first->code == eqvs[code]) found = true; if (!found) { missing.push_back(id + ";" + - studs[id]->get_lname() + ";" + - studs[id]->get_fname() + ";" + - courses[eqvs[code]]->get_code() + ";" + - courses[eqvs[code]]->get_name() + ";" + + studs[id]->lname + ";" + + studs[id]->fname + ";" + + courses[eqvs[code]]->code + ";" + + courses[eqvs[code]]->name + ";" + eqvs[code] + ";" + - courses[code]->get_name() + ";" + + courses[code]->name + ";" + lab::to_xstr<float>("%.1f", grade)); misscount++; } diff --git a/assignment-2.5-spreadsheets/src/student.cpp b/assignment-2.5-spreadsheets/src/student.cpp @@ -1,6 +0,0 @@ -#include "student.h" - -Student::Student(const lab::xstring& id, - const lab::xstring& lname, - const lab::xstring& fname) - :id(id), lname(lname), fname(fname) {} diff --git a/assignment-2.5-spreadsheets/src/student.h b/assignment-2.5-spreadsheets/src/student.h @@ -3,21 +3,16 @@ #include "xstring.h" -class Student +struct Student { - private: lab::xstring id; lab::xstring lname; lab::xstring fname; - public: Student(const lab::xstring& id, const lab::xstring& lname, - const lab::xstring& fname); - - constexpr const lab::xstring& get_id() const {return id;} - constexpr const lab::xstring& get_lname() const {return lname;} - constexpr const lab::xstring& get_fname() const {return fname;} + const lab::xstring& fname) + :id(id), lname(lname), fname(fname) {} }; #endif /* STUDENT_H */