uni

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

commit 86e1738e83a46ea0ee41c08d74af11b150465465
parent 7c8857a7f725ee7bf3b6486f86a6b27057c7d37b
Author: Christos Margiolis <christos@margiolis.net>
Date:   Fri, 10 Apr 2020 12:12:08 +0300

fixed some caps

Diffstat:
Massignment-2.3-operoverloading/bin/operoverloading | 0
Massignment-2.3-operoverloading/obj/subject.o | 0
Massignment-2.3-operoverloading/src/main.cpp | 12++++++------
Massignment-2.3-operoverloading/src/subject.cpp | 6+++---
4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/assignment-2.3-operoverloading/bin/operoverloading b/assignment-2.3-operoverloading/bin/operoverloading Binary files differ. diff --git a/assignment-2.3-operoverloading/obj/subject.o b/assignment-2.3-operoverloading/obj/subject.o Binary files differ. diff --git a/assignment-2.3-operoverloading/src/main.cpp b/assignment-2.3-operoverloading/src/main.cpp @@ -139,15 +139,15 @@ static void equals_overload(const Student& s1, Student& s2) static void constructor3(const Student& s3) { - std::cout << "constructor for s3 (am, name, semester, subjects passed, grades)" << std::endl; + std::cout << "Constructor for s3 (AM, Name, Semester, Subjects passed, Grades)" << std::endl; std::cout << "----------------------------" << std::endl; - std::cout << "am: " << s3.get_AM() << std::endl; - std::cout << "name: " << s3.get_name() << std::endl; - std::cout << "semester: " << s3.get_semester() << std::endl; - std::cout << "subjects passed: " << s3.get_psubj() << std::endl; + std::cout << "AM: " << s3.get_AM() << std::endl; + std::cout << "Name: " << s3.get_name() << std::endl; + std::cout << "Semester: " << s3.get_semester() << std::endl; + std::cout << "Subjects passed: " << s3.get_psubj() << std::endl; float *gr = s3.get_grades(); - std::cout << "grades: "; + std::cout << "Grades: "; for (unsigned int i = 0; i < s3.get_psubj(); i++) { if (i != s3.get_psubj()-1) std::cout << gr[i] << ", "; diff --git a/assignment-2.3-operoverloading/src/subject.cpp b/assignment-2.3-operoverloading/src/subject.cpp @@ -1,10 +1,10 @@ #include "subject.h" -Subject::Subject() {std::cout << "Constructor 1" << std::endl;} +Subject::Subject() {} Subject::Subject(const std::string& code, const std::string& sname, unsigned int subjsemester) - :code(code), sname(sname), subjsemester(subjsemester) {std::cout << "Constructor 2" << std::endl;} + :code(code), sname(sname), subjsemester(subjsemester) {} Subject::Subject(const Subject& s) - :code(s.code), sname(s.sname), subjsemester(s.subjsemester) {std::cout << "Copy Constructor" << std::endl;} + :code(s.code), sname(s.sname), subjsemester(s.subjsemester) {}