-
Notifications
You must be signed in to change notification settings - Fork 0
/
WISheader.h
31 lines (24 loc) · 790 Bytes
/
WISheader.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
// This file contains the definition/implementation of the WIS class
#ifndef WISHEADER_H
#define WISHEADER_H
#include <iostream>
class WIS {
private:
int startTime;
int finishTime;
int profit;
public:
WIS() : startTime(0), finishTime(0), profit(0) {}
WIS(int start, int finish, int weight) : startTime(start), finishTime(finish), profit(weight) {}
void setStartTime(int start) { startTime = start; }
void setFinishTime(int finish) { finishTime = finish; }
void setProfit(int weight) { profit = weight; }
int getStartTime() const { return startTime; }
int getFinishTime() const { return finishTime; }
int getProfit() const { return profit; }
void printFormattedJob() const {
std::cout << "(" << startTime << ", "
<< finishTime << ", " << profit << ")";
}
};
#endif