Website Summary Files Commits Branches @commit @diff @stats
path: root / Big4AndInheritance / Students / GradesBook.h
blob: e1dd26246b17691a438727616c8fda3769f63e50 (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
25
26
27
#pragma once
#include <iostream>

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 std::ostream& operator<<(std::ostream& stream, GradesBook& obj);

};