-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsection_col.h
More file actions
36 lines (25 loc) · 828 Bytes
/
Copy pathsection_col.h
File metadata and controls
36 lines (25 loc) · 828 Bytes
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
28
29
30
31
32
33
34
35
36
#ifndef SECTION_COL_H
#define SECTION_COL_H
#include "section.h"
#include <map>
using namespace std;
// Class SectionCol contains private variable sections
// An object of class SectionCol represents the collection of sections that a bookshop has.
class SectionCol {
public:
// method to add section to variable sections
void add_section(Section &c);
// method to remove section from variable sections
void delete_section(string name);
// checking whether such a section exists
bool is_section(string name);
// getter of an object of class Section
Section &get_section(string name);
// getter of the variable sections
const map<string, Section> &get_sections() const;
// method to show all sections
void show_all();
private:
map<string, Section> sections;
};
#endif