-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReport.h
56 lines (41 loc) · 1.02 KB
/
Report.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
/*
* Class: LinkedList (template)
*
* This class represents the report of each time the program runs.
* Features:
* Keep track of all the tickets generated in the current run
* Calculate total profit of the current run
* Save the current report list to the file in appending mode
*
* Designed by: Team 4
*
*/
#ifndef REPORT_H
#define REPORT_H
#include "LinkedList.cpp"
#include "Ticket.h"
class Report
{
private:
LinkedList<Ticket> *ticketsSold; // the list of all the reserved ticket of the current run
double dailyProfit; // total tickets' prices of the current report
// save the report back into the file
void save();
// sum all tickets' prices in the report
void countDailyProfit();
public:
/*********************
* CONSTRUCTOR
********************/
Report();
/*********************
* DESTRUCTOR
********************/
~Report();
/*********************
* MUTATOR
********************/
// add new ticket into the report
void add(Ticket *);
};
#endif