From 5090daa1e04f6a12d1110fd2a4b28aa1b2849bae Mon Sep 17 00:00:00 2001 From: Freitas_Enzo Date: Fri, 20 Feb 2026 15:17:47 +0000 Subject: [PATCH] =?UTF-8?q?T=C3=A9l=C3=A9verser=20les=20fichiers=20vers=20?= =?UTF-8?q?"/"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Grade.h | 20 ++++++++++++++++++++ Professor.cpp | 6 ++++++ Professor.h | 14 ++++++++++++++ Student.cpp | 8 ++++++++ Student.h | 19 +++++++++++++++++++ 5 files changed, 67 insertions(+) create mode 100644 Grade.h create mode 100644 Professor.cpp create mode 100644 Professor.h create mode 100644 Student.cpp create mode 100644 Student.h diff --git a/Grade.h b/Grade.h new file mode 100644 index 0000000..997e24b --- /dev/null +++ b/Grade.h @@ -0,0 +1,20 @@ +#ifndef GRADE_H +#define GRADE_H + +class Grade { +private: + int studentId; + int courseId; + float value; + +public: + Grade(int studentId, int courseId, float value); + + int getStudentId() const; + int getCourseId() const; + float getValue() const; + + void setValue(float value); +}; + +#endif \ No newline at end of file diff --git a/Professor.cpp b/Professor.cpp new file mode 100644 index 0000000..2b3b798 --- /dev/null +++ b/Professor.cpp @@ -0,0 +1,6 @@ +#include "Professor.h" + +Professor::Professor(int id, const std::string& username, const std::string& password) + : User(id, username, password) { + role = Role::PROF; +} \ No newline at end of file diff --git a/Professor.h b/Professor.h new file mode 100644 index 0000000..b0eec82 --- /dev/null +++ b/Professor.h @@ -0,0 +1,14 @@ +#ifndef PROFESSOR_H +#define PROFESSOR_H + +#include "User.h" +#include + +class Professor : public User { +public: + Professor(int id, const std::string& username, const std::string& passwordHash); + + void displayMenu() const override; +}; + +#endif \ No newline at end of file diff --git a/Student.cpp b/Student.cpp new file mode 100644 index 0000000..edf96ca --- /dev/null +++ b/Student.cpp @@ -0,0 +1,8 @@ +#include "Student.h" + +Student::Student(int id, const std::string& username, const std::string& password, const std::string& email) + : User(id, username, password), email(email) { + role = Role::STUDENT; +} + +std::string Student::getEmail() const { return email; } \ No newline at end of file diff --git a/Student.h b/Student.h new file mode 100644 index 0000000..a2e7317 --- /dev/null +++ b/Student.h @@ -0,0 +1,19 @@ +#ifndef STUDENT_H +#define STUDENT_H + +#include "User.h" +#include + +class Student : public User { +private: + std::string email; + +public: + Student(int id, const std::string& username, const std::string& passwordHash, const std::string& email); + + std::string getEmail() const; + + void displayMenu() const override; +}; + +#endif \ No newline at end of file