From b9df311eb4e479c150eeb112df91a3ce4dd111ba Mon Sep 17 00:00:00 2001 From: angeld55 Date: Fri, 16 Apr 2021 22:38:37 +0300 Subject: 9 --- Sem. 09/task (not finished)/UniCourse.h | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Sem. 09/task (not finished)/UniCourse.h (limited to 'Sem. 09/task (not finished)/UniCourse.h') diff --git a/Sem. 09/task (not finished)/UniCourse.h b/Sem. 09/task (not finished)/UniCourse.h new file mode 100644 index 0000000..fde1518 --- /dev/null +++ b/Sem. 09/task (not finished)/UniCourse.h @@ -0,0 +1,35 @@ +#include "Student.h" + +class UniCourse +{ + char* lecturerName; + char* assistantsNames[3]; + + Student** students; + size_t capacity; + size_t size; + + void copyFrom(const UniCourse& other); + void free(); + + size_t findStudentByFn(size_t fn); + + void resize(); + +public: + UniCourse(const char* lecturerName); + UniCourse(const char* lecturerName, const char* assistant1Name); + UniCourse(const char* lecturerName, const char* assistant1Name, const char* assistant2Name); + UniCourse(const char* lecturerName, const char* assistant1Name, const char* assistant2Name, const char* assistant3Name); + + + UniCourse(const UniCourse& other); + UniCourse& operator=(const UniCourse& other); + ~UniCourse(); + + void addStudent(const char* name, size_t fn); + void removeStudent(size_t fn); + + void print(); + +}; \ No newline at end of file -- cgit v1.3.1-23-gd82d