-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelements.h
More file actions
71 lines (62 loc) · 1.38 KB
/
Copy pathelements.h
File metadata and controls
71 lines (62 loc) · 1.38 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
#ifndef ELEMENTS_H
#define ELEMENTS_H
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include <vector>
#include "myclock.h"
using namespace std;
/*
* class Track & Session & Item
* public variables need set() get() function TBD
*/
class Item {
public:
string m_name;
int m_cost;
bool is_scheduled;
bool operator <(const Item &other) const
{
return m_cost < other.m_cost;
}
bool operator >(const Item &other) const
{
return m_cost > other.m_cost;
}
};
class SessionMorning {
public:
unsigned int m_remains;
vector<class Item> m_items;
Clock m_clk;
void Show();
};
class SessionAfternoon {
public:
unsigned int m_remains;
vector<class Item> m_items;
Clock m_clk;
void Show();
};
class ItemSets {
public:
unsigned int m_totals;
vector <class Item> m_items;
void Show();
void SortItems();
bool IsFinish();//whether all the items have already been scheduled
};
class Track {
public:
bool m_scheduled;
class SessionMorning m_morning_session;
class SessionAfternoon m_afternoon_session;
};
class TrackSets {
public:
unsigned int m_valid_days;
vector <class Track> m_tracks;
void Show();
};
#endif