From 335c0fca5c74c263c8ff21b2db193b423e46c4fe Mon Sep 17 00:00:00 2001 From: Angeld55 Date: Fri, 20 Sep 2019 14:56:56 +0300 Subject: Add files via upload --- Big4AndInheritance/Students/GradesBook.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Big4AndInheritance/Students/GradesBook.h (limited to 'Big4AndInheritance/Students/GradesBook.h') diff --git a/Big4AndInheritance/Students/GradesBook.h b/Big4AndInheritance/Students/GradesBook.h new file mode 100644 index 0000000..c9ba8e9 --- /dev/null +++ b/Big4AndInheritance/Students/GradesBook.h @@ -0,0 +1,24 @@ +class GradesBook +{ + int* grades; + int size; + int capacity; + + bool isValidGrade(int grade); + void Resize(); + void CopyFrom(const GradesBook& other); + void Free(); +public: + GradesBook(); + GradesBook(const GradesBook& other); + GradesBook& operator=(const GradesBook& other); + ~GradesBook(); + + bool isFull(); + void AddGrade(int grade); + void RemoveLastGrade(); + + int operator[](int index) const; + friend ostream& operator<<(ostream& stream, GradesBook& obj); + +}; -- cgit v1.3.1-23-gd82d