-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdomain.h
88 lines (69 loc) · 1.27 KB
/
domain.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
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
83
84
85
86
87
88
/*
* domain.h
*
* Created on: Apr 5, 2015
* Author: Dutzi
*/
#ifndef DOMAIN_H_
#define DOMAIN_H_
#include <string>
#include <sstream>
#include <iostream>
using namespace std;
/*Class*/
class Offer
{
private:
int id;
string destination;
string type;
float price;
public:
/*Constructors*/
Offer(string destination, string type, float price);
Offer();
/* Destructor */
~Offer();
void operator=(Offer other);
bool operator==(Offer& other);
friend std::ostream& operator <<(std::ostream&, const Offer&);
friend std::istream& operator >>(std::istream&, Offer&);
/*
Set destination for an offer
- elem: offer
- dest: the destination that is added
*/
void setDest(string dest);
/*
Get destination of an offer
- elem: offer
Return the destination
*/
string getDest();
/*
Set type for an offer
- elem: offer
- type: the type that is added
*/
void setType(string type);
/*
Get type for an offer
- elem: offer
Return the type of that elem
*/
string getType();
/*
Set price for an offer
- elem: offer
- price: the price that is added
*/
void setPrice(float price);
/*
Get price for an offer
- elem: offer
Return the price of that elem
*/
float getPrice();
int getId();
};
#endif /* DOMAIN_H_ */