当前位置: 首页 > wzjs >正文

网站建设 微信开发深圳比较好的网站建设公司

网站建设 微信开发,深圳比较好的网站建设公司,wordpress装饰公司主题,怎么发布个人网站酒店客房管理系统 要求: 1.客房信息管理:包括客房的编号、类型、价格、状态等信息的录入和修改; 2.顾客信息管理:包括顾客的基本信息、预订信息等的管理; 3.客房预订:客户可以根据需要进行客房的预订,系统会自动判断客房的可用情况; 4.入住管理:客户入住…

酒店客房管理系统 要求:
1.客房信息管理:包括客房的编号、类型、价格、状态等信息的录入和修改;
2.顾客信息管理:包括顾客的基本信息、预订信息等的管理;
3.客房预订:客户可以根据需要进行客房的预订,系统会自动判断客房的可用情况;
4.入住管理:客户入住时需要进行登记,同时系统会自动更改客房的状态信息;
*5.结账管理:客户结账需要进行登记,同时系统会自动更改客房的状态信息;
*6.统计报表:包括客房的使用情况、收入情况等的统计报表。

5和6 功能可选 使用文件保存信息
在这里插入图片描述

在这里插入代码片
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <map>
#include <string>// 客房类
class Room {
public:int number;std::string type;double price;std::string status;  // "available", "occupied", "reserved"Room(int num, std::string t, double p) : number(num), type(t), price(p), status("available") {}
};// 顾客类
class Customer {
public:std::string name;std::string contact;int roomNumber;std::string checkInDate;std::string checkOutDate;Customer(std::string n, std::string c, int room, std::string in, std::string out): name(n), contact(c), roomNumber(room), checkInDate(in), checkOutDate(out) {}
};// 客房信息管理
class RoomManagement {
private:std::vector<Room> rooms;std::string roomFilePath = "rooms.txt";void saveRoomsToFile() {std::ofstream file(roomFilePath);for (const auto& room : rooms) {file << room.number << "," << room.type << "," << room.price << "," << room.status << std::endl;}file.close();}void loadRoomsFromFile() {std::ifstream file(roomFilePath);std::string line;while (std::getline(file, line)) {std::istringstream iss(line);int number;std::string type;double price;std::string status;std::getline(iss, type, ',');iss >> number;iss.ignore();std::getline(iss, type, ',');iss >> price;iss.ignore();std::getline(iss, status, ',');rooms.push_back(Room(number, type, price));}file.close();}public:RoomManagement() {loadRoomsFromFile();}void addRoom(int number, std::string type, double price) {rooms.push_back(Room(number, type, price));saveRoomsToFile();}void updateRoom(int number, std::string type, double price, std::string status) {for (auto& room : rooms) {if (room.number == number) {room.type = type;room.price = price;room.status = status;break;}}saveRoomsToFile();}std::vector<Room> getRooms() const {return rooms;}
};// 顾客信息管理
class CustomerManagement {
private:std::vector<Customer> customers;std::string customerFilePath = "customers.txt";void saveCustomersToFile() {std::ofstream file(customerFilePath);for (const auto& customer : customers) {file << customer.name << "," << customer.contact << "," << customer.roomNumber << ","<< customer.checkInDate << "," << customer.checkOutDate << std::endl;}file.close();}void loadCustomersFromFile() {std::ifstream file(customerFilePath);std::string line;while (std::getline(file, line)) {std::istringstream iss(line);std::string name, contact, checkInDate, checkOutDate;int roomNumber;std::getline(iss, name, ',');std::getline(iss, contact, ',');iss >> roomNumber;iss.ignore();std::getline(iss, checkInDate, ',');std::getline(iss, checkOutDate, ',');customers.push_back(Customer(name, contact, roomNumber, checkInDate, checkOutDate));}file.close();}public:CustomerManagement() {loadCustomersFromFile();}void addCustomer(std::string name, std::string contact, int roomNumber, std::string checkInDate, std::string checkOutDate) {customers.push_back(Customer(name, contact, roomNumber, checkInDate, checkOutDate));saveCustomersToFile();}void updateCustomer(int roomNumber, std::string name, std::string contact, std::string checkInDate, std::string checkOutDate) {for (auto& customer : customers) {if (customer.roomNumber == roomNumber) {customer.name = name;customer.contact = contact;customer.checkInDate = checkInDate;customer.checkOutDate = checkOutDate;break;}}saveCustomersToFile();}std::vector<Customer> getCustomers() const {return customers;}
};// 客房预订
class RoomReservation {
private:RoomManagement& roomMgmt;CustomerManagement& customerMgmt;public:RoomReservation(RoomManagement& rm, CustomerManagement& cm) : roomMgmt(rm), customerMgmt(cm) {}void reserveRoom(int roomNumber, std::string customerName, std::string customerContact, std::string checkInDate, std::string checkOutDate) {auto rooms = roomMgmt.getRooms();for (auto& room : rooms) {if (room.number == roomNumber && room.status == "available") {room.status = "reserved";roomMgmt.updateRoom(room.number, room.type, room.price, room.status);customerMgmt.addCustomer(customerName, customerContact, roomNumber, checkInDate, checkOutDate);std::cout << "Room " << roomNumber << " reserved successfully for " << customerName << std::endl;return;}}std::cout << "Room " << roomNumber << " is not available for reservation." << std::endl;}
};// 入住管理
class CheckIn {
private:RoomManagement& roomMgmt;CustomerManagement& customerMgmt;public:CheckIn(RoomManagement& rm, CustomerManagement& cm) : roomMgmt(rm), customerMgmt(cm) {}void checkInCustomer(int roomNumber) {auto rooms = roomMgmt.getRooms();for (auto& room : rooms) {if (room.number == roomNumber && room.status == "reserved") {room.status = "occupied";roomMgmt.updateRoom(room.number, room.type, room.price, room.status);std::cout << "Customer checked in to room " << roomNumber << std::endl;return;}}std::cout << "Room " << roomNumber << " is not in a reserved state for check - in." << std::endl;}
};// 结账管理
class CheckOut {
private:RoomManagement& roomMgmt;CustomerManagement& customerMgmt;public:CheckOut(RoomManagement& rm, CustomerManagement& cm) : roomMgmt(rm), customerMgmt(cm) {}void checkOutCustomer(int roomNumber) {auto rooms = roomMgmt.getRooms();for (auto& room : rooms) {if (room.number == roomNumber && room.status == "occupied") {room.status = "available";roomMgmt.updateRoom(room.number, room.type, room.price, room.status);std::cout << "Customer checked out from room " << roomNumber << std::endl;return;}}std::cout << "Room " << roomNumber << " is not in an occupied state for check - out." << std::endl;}
};// 统计报表
class Statistics {
private:RoomManagement& roomMgmt;CustomerManagement& customerMgmt;public:Statistics(RoomManagement& rm, CustomerManagement& cm) : roomMgmt(rm), customerMgmt(cm) {}void printRoomUsage() {auto rooms = roomMgmt.getRooms();std::cout << "Room Usage Statistics:" << std::endl;int availableCount = 0, occupiedCount = 0, reservedCount = 0;for (const auto& room : rooms) {if (room.status == "available") availableCount++;else if (room.status == "occupied") occupiedCount++;else if (room.status == "reserved") reservedCount++;}std::cout << "Available Rooms: " << availableCount << std::endl;std::cout << "Occupied Rooms: " << occupiedCount << std::endl;std::cout << "Reserved Rooms: " << reservedCount << std::endl;}void printIncome() {auto rooms = roomMgmt.getRooms();auto customers = customerMgmt.getCustomers();double totalIncome = 0;for (const auto& customer : customers) {for (const auto& room : rooms) {if (customer.roomNumber == room.number) {totalIncome += room.price;break;}}}std::cout << "Total Income: " << totalIncome << std::endl;}
};

主函数

在这里插入代码片
int main() {RoomManagement roomMgmt;CustomerManagement customerMgmt;RoomReservation reservation(roomMgmt, customerMgmt);CheckIn checkIn(roomMgmt, customerMgmt);CheckOut checkOut(roomMgmt, customerMgmt);Statistics stats(roomMgmt, customerMgmt);// 测试客房信息管理roomMgmt.addRoom(101, "Single", 80.0);roomMgmt.addRoom(102, "Double", 120.0);// 测试客房预订reservation.reserveRoom(101, "John Doe", "123 - 456 - 7890", "2025 - 02 - 15", "2025 - 02 - 17");// 测试入住管理checkIn.checkInCustomer(101);// 测试结账管理checkOut.checkOutCustomer(101);// 测试统计报表stats.printRoomUsage();stats.printIncome();return 0;
}

在这里插入图片描述


文章转载自:

http://jjN0UrO0.mtmnk.cn
http://KcOycueO.mtmnk.cn
http://oYqx4mMN.mtmnk.cn
http://5CIEOCSy.mtmnk.cn
http://GquCaVYh.mtmnk.cn
http://s2VXwSBm.mtmnk.cn
http://2sclVGaj.mtmnk.cn
http://COuGmD2y.mtmnk.cn
http://vFPpcU4l.mtmnk.cn
http://aj239Ivz.mtmnk.cn
http://LSbd3wqr.mtmnk.cn
http://D8ICjghn.mtmnk.cn
http://ygALWkEo.mtmnk.cn
http://TFKMs4lo.mtmnk.cn
http://sDByrJed.mtmnk.cn
http://6seSgN23.mtmnk.cn
http://16IZ3qaK.mtmnk.cn
http://otgNXBHe.mtmnk.cn
http://wIgBjtgQ.mtmnk.cn
http://pY3rFen0.mtmnk.cn
http://oAcmqpd4.mtmnk.cn
http://9LqTDVMR.mtmnk.cn
http://2CK5LgA9.mtmnk.cn
http://EqulXIlT.mtmnk.cn
http://wqLRHnVd.mtmnk.cn
http://Ip0yA10t.mtmnk.cn
http://jBD2ZPZb.mtmnk.cn
http://cL2xrkb5.mtmnk.cn
http://KBe0Tzf3.mtmnk.cn
http://aqiNHtp9.mtmnk.cn
http://www.dtcms.com/wzjs/712158.html

相关文章:

  • 网站开发工资高么深圳建设工程交易服务网宝安分中心
  • 路由器设置手机网站打不开网站建设 荆州
  • 帮开设赌场的网站做美工wordpress批量发邮
  • 橙色 网站wordpress学校管理系统
  • 网站建设综合实训总结与体会黄骅市属于哪个省
  • 网站开发的历史成品网站模板下载
  • 网站建设与维护技术浅谈论文古塔网站建设
  • 网站开发设计怎么找客户域名可以做网站名吗
  • 地方美食网站开发意义信息化建设 网站
  • 制作网站的公司办什么营业执照天津网站seo营销模板
  • 天津网站开发制作湛江的高铁站建在哪里
  • wordpress全站广告位广州建筑公司排名
  • 比较好的平面设计网站摄影主题 wordpress
  • 福州市建设工程材料价格管理系统网站宁波网页关键词优化公司
  • 建网站容易吗建设内网网站流程
  • 国外平面设计分享网站有哪些网站代码调试
  • 网站建设策划书网站发布与推广动态域名可以建网站
  • 不注册公司可以做网站吗网站哪家做得好
  • 顺德哪家做网站网络营销专业学校有哪些
  • 六安市城市建设档案馆网站购物app开发多少钱
  • 嘉兴城乡建设厅网站怎么给网站绑定域名
  • 福建城市建设厅网站开发网站需要什么硬件
  • qq教程网站源码上虞区住房和城乡建设局网站
  • 中国住房城乡建设部官方网站办公室装修费用分几年摊销
  • wordpress找不到xml国内seo排名
  • 阿里云免费网站备案网站建设可行性研究报告
  • 企业网站建设综合实训心得唐山建设网站
  • 购物网站用模板好不好安徽省建设厅网站资料下载
  • 广州网站的设计公司有赞分销模式佣金
  • 哪里有做美食的视频网站如何做服装的微商城网站