物業(yè)費(fèi)管理系統(tǒng)_第1頁
物業(yè)費(fèi)管理系統(tǒng)_第2頁
物業(yè)費(fèi)管理系統(tǒng)_第3頁
物業(yè)費(fèi)管理系統(tǒng)_第4頁
物業(yè)費(fèi)管理系統(tǒng)_第5頁
已閱讀5頁,還剩46頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、1問題描述1.1使用鏈表文件1.2新戶信息的添加。(戶主姓名、性別、身份證號(hào)、聯(lián)系電話、樓號(hào)、單元號(hào)、 房號(hào)、平米數(shù)、每平米物業(yè)價(jià)格、應(yīng)繳納物業(yè)費(fèi),備注信息)1.3修改住戶信息的功能1.4刪除住戶信息的功能1.5應(yīng)繳物業(yè)費(fèi)自動(dòng)生成。每月1號(hào),自動(dòng)生成本月份的物業(yè)費(fèi)。如果該住戶 之前的物業(yè)費(fèi)未交清,則本月物業(yè)費(fèi)與之前拖欠費(fèi)用進(jìn)行累加,為該用戶 應(yīng)繳納的物業(yè)費(fèi)1.6繳費(fèi)功能。根據(jù)用戶繳納金額,修改“應(yīng)繳納物業(yè)費(fèi)”1.7能夠按樓號(hào) 分類統(tǒng)計(jì)所有未交清物業(yè)費(fèi)的記錄1.8能夠按拖欠款項(xiàng)多少,對所有用戶信息進(jìn)行從大到小排序1.9用菜單進(jìn)行管理1.10只有正確輸入用戶名密碼才能使用此系統(tǒng)1.11所有內(nèi)容能夠

2、保存到文件中。下次進(jìn)入系統(tǒng)是從文件中讀取原有信息2源代碼PP錄入信息);gotoxy(10, 7);printf(2.瀏覽信息);gotoxy(10, 9);OREGROUND_INTENSITY|FOREGROUND_BLUE);printf(3.刪除信息”);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);gotoxy(10, 11);printf(4.更改信息”);gotoxy(10, 13);printf(5.繳費(fèi)功能”);g

3、otoxy(10, 15);printf(6.未繳費(fèi)查詢(樓號(hào));gotoxy(10, 17);printf(7,未繳費(fèi)查詢(欠款);gotoxy(10, 19);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);printf(8,修改密碼”);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);got

4、oxy(10, 21);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);printf(9.退出程序”);OREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);gotoxy(10, 23);printf(10.自動(dòng)計(jì)算物業(yè)費(fèi)”);gotoxy(35, 20);printf(請輸入你的選擇:”);gotoxy(50, 20);scanf(%s”, str);return n = atoi(str);int menu2(v

5、oid)char str10;int n;system(cls);toutiao;修改用戶名”);gotoxy(10, 7);printf(2.修改性別);gotoxy(10, 9);printf(3.修改電話號(hào)碼);gotoxy(10, 11);printf(4,修改備注”);gotoxy(10, 13);printf(5.停止修改”);n);getchar();system(cls);break;system(cls);temp = p;p = (OWNER *)malloc(sizeof(OWNER);temp-next = p;Save(Head);CLC;SetConsoleText

6、Attribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);gotoxy(30, 10);printf(輸入的數(shù)據(jù)保存完畢n);for(i = 5; i 0; i -)gotoxy(30,12);OREGROUND_INTENSITY|FOREGROUND_GREEN);printf(保存成功%d秒后返回!”,i);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN|FOREGROUND_RED|FO

7、REGROUND_BLUE);_sleep(1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);return Head;void Display(OWNER *Head) n);getchar();system(cls);void Save(OWNER *Head)FILE *fp;OWNER *p;int i;CLC;fp = fopen(F:, w+);if (fp = NULL)gotoxy(20, 8);printf(

8、這個(gè)文件不存在!n);for(i = 1; i 0;i -)gotoxy(30,11);printf(%d秒后自動(dòng)退出!,i);_sleep(1000);exit(0);p = Head;while (p != NULL)fwrite(p, sizeof(OWNER), 1, fp);p = p-next;fclose(fp);OWNER *Deleat(OWNER *Head)int flag = 0;char DeleatName10, DeleatID10;int i;OWNER *p, *DeleatNode;OWNER *temp;CLC;toutiao;if (Head = NUL

9、L)/判斷頭指針是否為空gotoxy(30, 10);printf(-沒有任何保存的用戶信息! n);for(i = 5; i 0;i -)gotoxy(36,11);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);printf(%d 秒后返回!,i);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE

10、);_sleep(1000);elseprintf(-請輸入你想刪除業(yè)主的名字和身份證號(hào):n);scanf(%s %s”, DeleatName, DeleatID);while(strlen(DeleatName) 9 | strlen(DeleatlD) != 9) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),F OREGROUND_INTENSITY|FOREGROUND_BLUE);printf(輸入有誤請重新輸入!長度應(yīng)該小于9!n);SetConsoleTextAttribute(GetStdHandle(STD_

11、OUTPUT_HANDLE),F OREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);scanf(%s %s, DeleatName, DeleatID);temp = (OWNER *)malloc(sizeof(OWNER);temp-next = Head;p = temp;while (p-next != NULL)if (strcmp(p-next-name, DeleatName) = 0) & (strcmp(p-next-ID, DeleatID) = 0)DeleatNode = p-next;flag = 1;p-next = D

12、eleatNode-next;free(DeleatNode);continue;p = p-next;if (flag = 0)for(i = 5; i 0;i -)gotoxy(36,11);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),F OREGROUND_INTENSITY|FOREGROUND_BLUE);printf(沒有這個(gè)業(yè)%d秒后返回!”,i);FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);_sleep(1000);return Head;Head = te

13、mp-next;Save(Head);for(i = 5; i 0;i -)gotoxy(36,11);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);printf(刪除成功%d秒后返回!,i);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);_sleep(1000);return Head;OW

14、NER *Change(OWNER *Head)int Choice, i;char ChangeOwner10;OWNER *p = Head;CLC;toutiao;if (Head = NULL)/判斷頭指針是否為空gotoxy(30, 10);printf(-沒有任何保存的用戶信息可以進(jìn)行修改!n);for(i = 5; i 0;i -)gotoxy(36,11);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);printf(%d 秒后返回!,i)

15、;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);_sleep(1000);return Head;elseprintf (-請輸入你想要修改業(yè)主的名字:);scanf(%s”, ChangeOwner);while (p != NULL)if (strcmp(p-name, ChangeOwner) = 0)Choice = menu2();/while(Choice != 5)switch (Choice) case 1:CLC;

16、gotoxy(30, 11);printf(請輸入業(yè)主的名字”); scanf(%s”, p-name);while(strlen(p-name) 9 ) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),F OREGROUND_INTENSITY|FOREGROUND_BLUE);printf(輸入的信息不符合規(guī)范,請重新輸 入!nn);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),F OREGROUND_GREEN|FOREGROUND_RED|FOREGROUN

17、D_BLUE);gotoxy(30, 11);printf(請輸入業(yè)主名字:”); scanf(%s”, p-name);break;case 2:CLC;gotoxy(30, 11);printf(請輸入業(yè)主的性別:”);scanf(%d”, &p-sex);while(p-sex != 1 | p-sex != 0)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),F OREGROUND_INTENSITY|FOREGROUND_BLUE);printf(輸入的信息不符合規(guī)范,請重新輸 入!nn);SetConsoleTextA

18、ttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);gotoxy(30, 11);printf(請輸入業(yè)主性別n:);scanf(%d”, p-name);break;case 3:CLC;gotoxy(30, 11);printf(請輸入業(yè)主的電話號(hào)碼:”); scanf(%s”, p-phonenumber);while(strlen(p-phonenumber) 9 )SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT

19、_HANDLE),F OREGROUND_INTENSITY|FOREGROUND_BLUE);printf(輸入的信息不符合規(guī)范,請重新輸 入!nn);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),F OREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);gotoxy(30, 11);printf(請輸入業(yè)主名字:”); scanf(%s”, p-phonenumber);break;case 4:CLC;gotoxy(30, 11);printf(請輸入備注:”); scanf(%s

20、”, p-remarks);break;default:CLC;gotoxy(30, 11);printf(輸入有誤”);break;Choice = menu2();p = p-next;Save(Head);return Head;OWNER *Pay(OWNER *Head)OWNER *p = Head;char PayName10, PayID10;int i, flag = 0;float PayMoney = 0;CLC;toutiao;if (Head = NULL)/判斷頭指針是否為空gotoxy(30, 10);printf(-沒有任何保存的用戶信息! n);for(i =

21、 5; i 0;i -)gotoxy(36,11);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);printf(%d 秒后返回!,i);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);_sleep(1000);elseprintf(請輸入想要繳費(fèi)的業(yè)主名字:”);scanf(%s”, PayNa

22、me);printf(n請輸入想要繳費(fèi)的業(yè)主ID:);scanf(%s”, PayID);while(p != NULL)if (strcmp(p-name, PayName) = 0) & (strcmp(p-ID,PayID) = 0)gotoxy(30, 11);printf(該業(yè)主應(yīng)繳物業(yè)費(fèi)為:%, p-charge);if (p-charge = 0)gotoxy(30, 18);printf(此業(yè)主不用繳費(fèi)!”);for (i = 2; i 0; i -)gotoxy(10, 11);printf(%d 秒后返回!, i);Sleep(1000);return Head;gotox

23、y(30, 13);printf(業(yè)主繳費(fèi)為:”);scanf(%f”, &PayMoney);p-charge = p-charge - PayMoney;break;p = p-next;if (p = NULL)gotoxy(30, 13);printf(-沒有這個(gè)業(yè)主!);Sleep(3000);Save(Head);if (flag = 1)gotoxy(30, 15);printf(此業(yè)主繳費(fèi)成功!”); for(i = 3; i 0; i -) gotoxy(30, 18);printf(%d 秒后返回!, i);Sleep(1000);return Head;OWNER *Nu

24、mberList(OWNER *Head)OWNER *ConNode;OWNER *p;OWNER *p1, *p2;int i;CLC;if (Head = NULL)/判斷頭指針是否為空gotoxy(30, 10);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),F OREGROUND_INTENSITY|FOREGROUND_RED);printf(-沒有任何保存的用戶信息! n);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GRE

25、EN|FOREGROUND_RED|FOREGROUND_BLUE);for(i = 5; i 0;i -)gotoxy(36,13);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),F OREGROUND_INTENSITY|FOREGROUND_BLUE);printf(%d 秒后返回! ,i);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);_sleep(1000

26、);elsegotoxy(31, 3);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),F OREGROUND_INTENSITY|FOREGROUND_BLUE);printf(結(jié)果如下:n);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);/ /p1 = (OWNER *)malloc(sizeof(OWNER);直接插入排序p1-next = Head;Head

27、= p1;for (ConNode = NULL; ConNode != Head; ConNode = p)for (p = p1 = Head; p1-next-next != ConNode; p1 =p1-next)if(p1-next-building_numif(p1-next-building_nump1-next-next-building_num)p2 = p1-next-next;p1-next-next = p2-next;p2-next = p1-next;p1-next = p2;p = p1-next-next;p1 = Head;Head = Head-next;

28、free(p1);p1 = NULL;Display(Head);return Head;OWNER *UnChargeList(OWNER *Head)OWNER *ConNode;OWNER *p;OWNER *p1, *p2;int i;CLC;if (Head = NULL)/判斷頭指針是否為空gotoxy(30, 10);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),F OREGROUND_INTENSITY|FOREGROUND_RED);printf(-沒有任何保存的用戶信息! n);SetConsoleTextA

29、ttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);for(i = 5; i 0;i -)gotoxy(36,13);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);printf(%d 秒后返回!,i);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGR

30、OUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);_sleep(1000);elsegotoxy(31, 3);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),F OREGROUND_INTENSITY|FOREGROUND_BLUE);printf(結(jié)果如下:n);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);/ /p1 = (O

31、WNER *)malloc(sizeof(OWNER);直接插入排序p1-next = Head;Head = pl;for (ConNode = NULL; ConNode != Head; ConNode = p)for (p = pl = Head; p1-next-next != ConNode; pl = p1-next)if (p1-next-charge next-next-charge)p2 = p1-next-next;p1-next-next = p2-next;p2-next = p1-next;p1-next = p2;p = p1-next-next;p1 = Hea

32、d;Head = Head-next;free(p1);p1 = NULL;Display(Head);return Head;OWNER *AutoChargeAdd(OWNER *Head)/物業(yè)費(fèi)自動(dòng)生成函數(shù)按月結(jié)算 int Getyear = 0, Getmonth = 0, Getday = 0;/ 從系統(tǒng)獲取的時(shí) 間int JudgeYear = 0, JudgeMonth = 0, JudgeDay = 0; / 從保存 的文件中獲取時(shí)間來進(jìn)行判斷int i;OWNER*p=Head;/FILE *fp;struct tm *t;time_t tt;time(&tt);t = l

33、ocaltime(&tt);Getyear = t-tm_year + 1900;Getmonth = t-tm_mon + 1;Getday = t-tm_mday;fp = fopen(F:, r);if (fp = NULL)CLC;gotoxy(30, 10);printf(獲取時(shí)間信息失敗!n);for(i = 1; i 0;i -)gotoxy(10,11);printf(%d 秒后退出!,i);_sleep(1000);exit(1);fscanf(fp, %d %d %d, &JudgeYear, &JudgeMonth,&JudgeDay);/獲取保存的時(shí)間if (Judge

34、Month = Getmonth | Getyear = JudgeYear)CLC;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);for (i = 5; i 0; i -) printf(-不用計(jì)算費(fèi)用%d秒后返回!, i);Sleep(1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE

35、);return Head;/如果滿足上面的這個(gè)條件,就直接返回,不再執(zhí) 行下面的代碼,時(shí)間沒有到一個(gè)月,不用計(jì)算物業(yè)費(fèi)。if (Getyear JudgeYear) | (Getyear = JudgeYear & Getmonth JudgeMonth) | (Getyear = JudgeYear & Getmonth =JudgeMonth | Getday 0;i -)gotoxy(36,13);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),F OREGROUND_INTENSITY|FOREGROUND_BLUE);

36、printf(%d 秒后返回! ,i);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);_sleep(1000);elsewhile(p != NULL)p-charge = (float)(p-area * p-unit_price) + p-charge;p = p-next;Save(Head);for(i = 5; i 0;i -)gotoxy(36,13);SetConsoleTextAttribute(GetStdHan

37、dle(STD_OUTPUT_HANDLE),F OREGROUND_INTENSITY|FOREGROUND_BLUE);printf(物業(yè)費(fèi)計(jì)算成功! %d秒后返回!”,i);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);_sleep(1000);Getday = 1;fprintf(fp, %d %d %d, Getyear, Getmonth, Getday);/ 只有 當(dāng)程序正常運(yùn)行到這里的時(shí)候就能保存這個(gè)月的一號(hào)ret

38、urn Head;void TimeInitialValueSet(void)FILE *fp;int Getyear = 0, Getmonth = 0, Getday = 1;struct tm *t;time_t tt;time(&tt);t = localtime(&tt);Getyear = t-tm_year + 1900;Getmonth = t-tm_mon + 1;Getday = 1;fp = fopen(F:, r”);if (fp = NULL)fp = fopen(F:, w”);fprintf(fp, %d %d %d, Getyear, Getmonth, Get

39、day);fclose(fp);主函數(shù)int main(void)主函數(shù)FILE *fp;int i = 0;OWNER *head = NULL;int choice;SetConsoleTitle(-成都信息工程學(xué)院 計(jì)算機(jī)學(xué)院 計(jì)算機(jī)科學(xué) 與技術(shù)專業(yè)xxx班xxx工程實(shí)踐1);denglu();system(cls);jiance();TimeInitialValueSet();這個(gè)函數(shù)只在程序第一次運(yùn)行的時(shí)候完成對日期的初始化choice = menu();while (choice != 9)switch (choice)case 1:fp = fopen(F:, r);if (fp

40、 = NULL)head = CreatNode(head);elsehead = GetData(fp);fclose(fp);fp = NULL;head = CreatNode(head);break;case 2:fp = fopen(F:, r”);head = GetData(fp);if (head = NULL)CLC;gotoxy(30, 10);printf(-沒有保存任何數(shù)據(jù)!稍后程序即將推出!n);for(i = 1; i 0;i -)gotoxy(10,11);printf(%d 秒后退出! ,i);_sleep(1000);exit(1);Display(head);fclose(fp);break;case 3:f

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論