forked from SWE501-Spring2017-Bogazici/FinalProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTask.h
More file actions
76 lines (47 loc) · 1.18 KB
/
Task.h
File metadata and controls
76 lines (47 loc) · 1.18 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
/*
* Task.h
*
* Created on: Jun 2, 2017
* Author: Can Candan
*/
#ifndef TASK_H_
#define TASK_H_
class Task {
private:
int id;
double cpuWork;
double outputWork;
double waitCpu=0;
double waitOut=0;
double cpuServiceStopTime=0;
double outTime=0;
double remainingOutWork=0;
double arrivalTime;
bool finished;
public:
Task();
Task(double arrivalTime, double cpuWork, double outputWork);
double outputWorked(double time, double quantum);
double getOutTime() const;
void setOutTime(double outTime);
double getArrivalTime() const;
void setArrivalTime(double arrivalTime);
bool isFinished() const;
void setFinished(bool finished);
double getRemainingOutWork() const;
void setRemainingOutWork(double remainingOutWork);
double getCpuWork() const;
void setCpuWork(double cpuWork);
double getOutputWork() const;
void setOutputWork(double outputWork);
double getWaitCpu() const;
void setWaitCpu(double waitCpu);
double getWaitOut() const;
void setWaitOut(double waitOut);
double getCpuServiceStopTime() const;
void setCpuServiceStopTime(double cpuServiceStopTime);
int getId() const;
void setId(int id);
virtual ~Task();
};
#endif /* TASK_H_ */