Website Summary Files Commits Branches @commit @diff @stats
path: root / Big4AndInheritance / Students / GradesBook.h
diff options
context:
space:
mode:
1 files changed, 24 insertions, 0 deletions
-rw-r--r--Big4AndInheritance/Students/GradesBook.h24
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);
+
+};