-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatistics.hpp
More file actions
82 lines (67 loc) · 1.59 KB
/
statistics.hpp
File metadata and controls
82 lines (67 loc) · 1.59 KB
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
76
77
78
79
80
81
82
//
// statistics.hpp
// Test Product
//
// Created by David Brown on 10/06/2017.
// Copyright © 2017 David Brown. All rights reserved.
//
#ifndef statistics_hpp
#define statistics_hpp
#include <stdio.h>
#include <iostream>
#include <vector>
#include "account.hpp"
#include "register.hpp"
class Statistics
{
private:
static Statistics *_instance;
struct Fields
{
struct
{
int bfwd = 0;
int exp = 0;
int ben = 0;
int rec = 0;
int cfwd = 0;
size_t num_firms = 0;
size_t num_emps = 0;
size_t num_unemps = 0;
size_t num_gov_emps = 0;
int hires = 0;
int fires = 0;
} gov;
struct
{
int bfwd = 0;
int grant = 0;
int sales = 0;
int sales_tax = 0;
int dedns = 0;
int wages = 0;
int bonuses = 0;
int cfwd = 0;
} prod;
struct
{
int start = 0; // NB not bfwd as may have changed status
int wages = 0;
int benefits = 0; // may have been unemployed at start of period
int inc_tax = 0;
int purch = 0;
int sales_tax = 0;
int close = 0;
} emp;
};
std::vector<Fields*> stats;
protected:
Statistics();
Register *reg;
public:
static Statistics *Instance();
struct Fields *current;
void next(int period);
void report();
};
#endif /* statistics_hpp */