From 5dda3a1f40e4e8f621b20f374c02b6d1e241e7cf Mon Sep 17 00:00:00 2001 From: angeld55 Date: Tue, 10 May 2022 20:06:53 +0300 Subject: sem 11 --- Sem. 11/Examples/Student/Student.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Sem. 11/Examples/Student/Student.h (limited to 'Sem. 11/Examples/Student/Student.h') diff --git a/Sem. 11/Examples/Student/Student.h b/Sem. 11/Examples/Student/Student.h new file mode 100644 index 0000000..af99e30 --- /dev/null +++ b/Sem. 11/Examples/Student/Student.h @@ -0,0 +1,25 @@ +#include +#include "../Person/Person.h" + +class Student : public Person +{ + size_t fn = 0; + size_t grade = 2; +public: + Student() = default; + Student(const char* name, int age, size_t fn); + + size_t getFn() const; + void setFn(size_t fn); + + + // No need for big 4, since there is NO dyn. memory in Student + // The compiler will generate valid: + + //Student(const Student& other); + //Student& operator=(const Student& other); //no need + // ~Student() + + //See on the .cpp file how the compiler creates them + +}; -- cgit v1.3.1-23-gd82d