-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroom.cpp
21 lines (17 loc) · 887 Bytes
/
room.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "room.h"
Room::Room(int num, string type, double price):
roomNo(num), roomType(type), roomPrice(price), roomAvailability(true){}
//Getters
int Room::getRoomNum() const{return roomNo;}
string Room::getRoomType() const{return roomType;}
double Room::getRoomPrice() const{return roomPrice;}
bool Room::getRoomAvailability() const{return roomAvailability;}
//Setters
bool Room::setRoomAvailability(bool availability){return roomAvailability = availability;}
//display room details
void Room::roomDetails() const{
cout << "Room No: " << roomNo << endl;
cout << "Room Type: " << roomType << endl;
cout << "Room Price (per night) $: " << roomPrice << endl;
cout << "Room Availability: " << (roomAvailability ? "Available" : "Booked") << endl;
}