-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroom.cpp
More file actions
81 lines (50 loc) · 973 Bytes
/
room.cpp
File metadata and controls
81 lines (50 loc) · 973 Bytes
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
#include "room.h"
Room::Room()
{
this->roomNum = "0";
this->roomStyle = 0;
this->roomCost = 0.0;
}
Room::Room(QString rNumber, int rStyle, float rCost)
{
this->roomNum = rNumber;
this->roomStyle = rStyle;
this->roomCost = rCost;
}
Room::~Room()
{
}
QString Room::getNum()
{
return this->roomNum;
}
int Room::getStyle()
{
return this->roomStyle;
}
float Room::getCost()
{
return this->roomCost;
}
void Room::setNum(QString newNum)
{
this->roomNum = newNum;
}
void Room::setStyle(int newStyle)
{
this->roomStyle = newStyle;
}
void Room::setCost(float newCost)
{
this->roomCost = newCost;
}
QString Room::outputString()
{
QString allInfo = "Number: ";
allInfo.append(this->roomNum += ", ");
allInfo.append("Style: ");
allInfo.append(QString::number(this->roomStyle) += ", ");
allInfo.append("Cost: ");
allInfo.append(QString::number(this->roomCost));
return allInfo;
}