Téléverser les fichiers vers "/"
This commit is contained in:
6
Admin.cpp
Normal file
6
Admin.cpp
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#include "Admin.h"
|
||||||
|
|
||||||
|
Admin::Admin(int id, const std::string& username, const std::string& password)
|
||||||
|
: User(id, username, password) {
|
||||||
|
role = Role::ADMIN;
|
||||||
|
}
|
||||||
14
Admin.h
Normal file
14
Admin.h
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#ifndef ADMIN_H
|
||||||
|
#define ADMIN_H
|
||||||
|
|
||||||
|
#include "User.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
class Admin : public User {
|
||||||
|
public:
|
||||||
|
Admin(int id, const std::string& username, const std::string& passwordHash);
|
||||||
|
|
||||||
|
void displayMenu() const override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
10
Course.cpp
Normal file
10
Course.cpp
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#include "Course.h"
|
||||||
|
|
||||||
|
Course::Course(int id, const std::string& name)
|
||||||
|
: id(id), name(name) {}
|
||||||
|
|
||||||
|
int Course::getId() const { return id; }
|
||||||
|
|
||||||
|
std::string Course::getName() const { return name; }
|
||||||
|
|
||||||
|
void Course::setName(const std::string& name) { this->name = name; }
|
||||||
20
Course.h
Normal file
20
Course.h
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#ifndef COURSE_H
|
||||||
|
#define COURSE_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class Course {
|
||||||
|
private:
|
||||||
|
int id;
|
||||||
|
std::string name;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Course(int id, const std::string& name);
|
||||||
|
|
||||||
|
int getId() const;
|
||||||
|
std::string getName() const;
|
||||||
|
|
||||||
|
void setName(const std::string& name);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
12
Grade.cpp
Normal file
12
Grade.cpp
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#include "Grade.h"
|
||||||
|
|
||||||
|
Grade::Grade(int studentId, int courseId, float value)
|
||||||
|
: studentId(studentId), courseId(courseId), value(value) {}
|
||||||
|
|
||||||
|
int Grade::getStudentId() const { return studentId; }
|
||||||
|
|
||||||
|
int Grade::getCourseId() const { return courseId; }
|
||||||
|
|
||||||
|
float Grade::getValue() const { return value; }
|
||||||
|
|
||||||
|
void Grade::setValue(float value) { this->value = value; }
|
||||||
Reference in New Issue
Block a user