-
Notifications
You must be signed in to change notification settings - Fork 0
/
Session.h
75 lines (62 loc) · 1.39 KB
/
Session.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* File: Session.h
* Author: Kapil Thakkar
*
*/
#ifndef SESSION_H
#define SESSION_H
#include <iostream>
#include <cstdlib>
using namespace std;
/**
* Session holds an array of papers.
*
* @author Kapil Thakkar
*
*/
class Session
{
private:
int *papers; // array of paper
int papersInSession; // number of papers
public:
Session();
/**
* Constructor
*
* @param papersInSession the number of papers in a session.
*/
Session(int papersInSession);
/**
* Initialize the array of papers.
*
* @param papersInSession the number of papers in a session.
*/
void initPapers(int papersInSession);
/**
* Get the number of papers in a session.
*
* @return the number of papers.
*/
int getNumberOfPapers();
/**
* Get the id of the paper at the specified index
*
* @param index the index of the paper
* @return the id of the paper
*/
int getPaper(int index);
/**
* Set the paper id at the specified index.
*
* @param index is the index in the array
* @param paperId is the id of the paper
*/
void setPaper(int index, int paperId);
/**
* Print the papers present in current session
*
*/
void printSession();
};
#endif /* SESSION_H */