-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRoom.h
42 lines (36 loc) · 995 Bytes
/
Room.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
//
// Room.h
// projectfinal2
//
#ifndef ROOM_H
#define ROOM_H
#include <string>
#include <fstream>
using namespace std;
class Room {
private:
int roomNumber;
string type;
double price;
bool isAvailable;
string customerName;
string checkInDate;
string checkOutDate;
public:
Room(int number, string type, double price, bool available);
Room() = default; // Default constructor for file I/O
int getRoomNumber() const;
string getType() const;
double getPrice() const;
bool getIsAvailable() const;
string getCustomerName() const;
string getCheckInDate() const;
string getCheckOutDate() const;
void bookRoom(string customerName, string checkInDate, string checkOutDate);
void checkoutRoom();
void displayRoomInfo() const;
void saveToFile(ofstream &outFile) const; // Save room details to file
void loadFromFile(ifstream &inFile); // Load room details from file
double calculateBill() const;
};
#endif