資源簡(jiǎn)介
C++ 寫客房管理系統(tǒng),代碼無錯(cuò)誤,含詳細(xì)說明和開發(fā)論文

代碼片段和文件信息
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
using?namespace?std;
struct??date??//日期
{
int?year;
int?month;
int?day;
int?house;
int?minute;
}?;?
struct?Room????//房間結(jié)構(gòu)體
{
int?number;?//房號(hào)?每層10給房?一個(gè)類型房間號(hào)如:101到110?801到810
int?type;???//房型?1、標(biāo)準(zhǔn)單人房(100¥/晚)?2、標(biāo)準(zhǔn)雙人房(180¥/晚)?3、豪華單人房(150¥/晚)?4、豪華雙人房(250¥/晚)?5、行政房(200¥/晚)?6、商務(wù)房(200¥/晚)?7、家庭間(250¥/晚)?8、蜜月間(250¥/晚)
double?price;??//價(jià)格
int?state;??//狀態(tài)?0空閑,1預(yù)訂?2已入住
};
class??CustomerNode???//顧客節(jié)點(diǎn)
{?
public:
CustomerNode(){};
CustomerNode(int?type);
char?name[20];???//姓名
char?ID[18];?????//身份證號(hào)碼
char?zhiye[30];?????//職業(yè)
int??roomNumber;???//入住房號(hào)
int?roomType;??????//入住房型
int?bookTotal;?????//預(yù)訂套數(shù)
char?sex;????????//性別
int?age;
date?inDate;?????????//入住時(shí)間
date?outDate;???????//離開時(shí)間
CustomerNode?*next;
};
class?CustomerList{??????
public:
CustomerList(){??head=tail=0;??};
void??insert(?CustomerNode?*p);
void?deleteNode(CustomerNode?*tempCustomerNode?*p);
CustomerNode?*head*tail;
};
CustomerList?lst2;????//鏈表2存放預(yù)訂信息
CustomerList?lst;??????//鏈表存放顧客入住信息
void?CustomerList::insert(CustomerNode?*p){??//插入在頭結(jié)點(diǎn)
p->next=head;
head=p;
}
void?CustomerList::deleteNode(CustomerNode?*tempCustomerNode?*p){????//刪除
if(p->next==0?&&?temp!=p)?{temp->next=0;???delete(p);}
else{
if(temp==p)?{
p=p->next;
lst2.head=lst2.head->next;
// delete(p);
}
else{
temp->next?=?p->next;
delete(p);
}
}
}
CustomerNode::CustomerNode(int?type)?//構(gòu)造函數(shù)
{???
roomType=type;
cout<<“請(qǐng)輸入顧客姓名:“;
cin>>name;
while(1){
cout<<“請(qǐng)您輸入顧客的身份證號(hào)碼(18位):?“;?
cin>>ID;
if(strlen(ID)==18)?break;
else?cout<<“請(qǐng)正確輸入身份證號(hào)碼!“< }
cout<<“請(qǐng)輸入顧客年齡:“;
cin>>age;
cout<<“請(qǐng)輸入顧客職業(yè):“;
cin>>zhiye;
while(1){
cout<<“請(qǐng)輸入顧客性別(f/m):“;
cin>>sex;
if(sex==‘f‘||sex==‘m‘)?break;
else?cout<<“請(qǐng)正確輸入性別!“< }
time_t?t?=?time(NULL);
tm*?pt?=?localtime(&t);
inDate.year?=?1900?+?pt->tm_year;
inDate.month?=?pt->tm_mon?+?1;
inDate.day?=?pt->tm_mday;
inDate.house?=?pt->tm_hour;
inDate.minute?=?pt->tm_min;
//next?=?ptr;
//??cout<<1900?+?pt->tm_year<<‘-‘<tm_mon?+?1<<‘-‘<tm_mday<<‘?‘<tm_hour<<‘:‘<tm_min<<‘:‘<tm_sec<<‘\n‘;
};
int?totalroom=80;????//酒店總房間數(shù)
Room?room[811];???//全局變量
string?roomTypeNames[9]?=?{“oo““標(biāo)準(zhǔn)單人房““標(biāo)準(zhǔn)雙人房““豪華單人房““豪華雙人房““行政房““商務(wù)房““家庭間““蜜月間“};
int?totalday[13]?=?{0312931303130313130313031};
//登錄函數(shù)
int?password(){
int?flag=1;
string?passname;
string?passwords;
for(int?i=0;i<3;i++){
cout<<“請(qǐng)輸入用戶名(初始用戶000):“;
cin>>passname;
cout<<“請(qǐng)輸入密碼(初始密碼000):“;
cin>>passwords;
if(passname==“000“&&passwords==“000“){???????//初始密碼為000??000??進(jìn)入系統(tǒng)后可以修改
flag=0;
return?1;
break;
}
else{
cout<<“輸入錯(cuò)誤!請(qǐng)重試“< }
}system(“cls“);
if(flag==0){
return?0;}
system(“cls“);
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????????49??2011-09-08?08:18??客房管理系統(tǒng)(含一萬字論文)\debug\CustomerBookInformation.txt
?????文件????????614??2011-09-07?20:12??客房管理系統(tǒng)(含一萬字論文)\debug\CustomerInformation.txt
?????文件??????????0??2011-09-07?20:33??客房管理系統(tǒng)(含一萬字論文)\debug\manage.txt
?????文件???????1040??2011-09-07?20:12??客房管理系統(tǒng)(含一萬字論文)\debug\RoomInformation.txt
?????文件?????217088??2011-09-08?08:15??客房管理系統(tǒng)(含一萬字論文)\debug\客房管理系統(tǒng).exe
?????文件?????????38??2011-11-04?11:59??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\CustomerBookInformation.txt
?????文件????????584??2011-11-04?11:59??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\CustomerInformation.txt
?????文件???????8906??2011-09-08?08:15??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\Debug\BuildLog.htm
?????文件?????????67??2011-09-08?08:15??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\Debug\mt.dep
?????文件?????101376??2011-09-08?08:15??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\Debug\vc80.idb
?????文件????????145??2011-09-08?08:15??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\Debug\客房管理系統(tǒng).exe.intermediate.manifest
?????文件?????335775??2011-09-08?08:15??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\Debug\客房管理系統(tǒng).obj
?????文件??????????7??2011-11-04?12:00??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\manage.txt
?????文件???????1040??2011-09-08?08:15??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\RoomInformation.txt
?????文件??????23800??2011-09-08?08:17??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\客房管理系統(tǒng).cpp
?????文件???????3051??2011-08-29?21:56??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\客房管理系統(tǒng).vcproj
?????文件???????1427??2011-09-08?08:17??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\客房管理系統(tǒng).vcproj.MICROSOF-A0E2F2.Administrator.user
?????文件????2337792??2011-09-08?08:17??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng).ncb
?????文件????????919??2011-08-29?21:53??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng).sln
????..A..H.?????13824??2011-09-08?08:17??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng).suo
?????文件?????963584??2011-11-04?11:58??客房管理系統(tǒng)(含一萬字論文)\論文.doc
?????目錄??????????0??2011-11-04?11:56??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)\Debug
?????目錄??????????0??2011-11-04?11:56??客房管理系統(tǒng)(含一萬字論文)\debug
?????目錄??????????0??2011-11-04?11:56??客房管理系統(tǒng)(含一萬字論文)\客房管理系統(tǒng)
?????目錄??????????0??2011-11-04?11:59??客房管理系統(tǒng)(含一萬字論文)
-----------?---------??----------?-----??----
??????????????4011126????????????????????25
- 上一篇:信號(hào)FFT變換及繪圖
- 下一篇:井字棋 α-β剪枝算法
評(píng)論
共有 條評(píng)論