Website Summary Files Commits Branches @commit @diff @stats
path: root / Classes / GradesBook(DynamicArray) / GradesBook.h
blob: c9ba8e97122d3fe1f9ccd3619a92a0d3941a3926 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);

};