当前位置:网站首页>C language course set up property fee management system (big work)
C language course set up property fee management system (big work)
2022-07-01 06:25:00 【Ordinary senior】

One 、 Design function ( The article is for reference only )
Functional requirements :
(1) Addition of new household information .( Name of the householder 、 Gender 、 ID number 、 contact number 、 Building number 、 Unit no. 、 room number 、 Number of square meters 、 Property price per square meter 、 Property fee payable , Notes )
(2) Function of modifying household information .
(3) The function of deleting household information .
(4) The property fee payable is automatically generated . monthly 1 Number , Automatically generate the property fee of this month . If the previous property fee of the resident has not been paid , Then the property fee of this month will be accumulated with the previous arrears , It is the property fee that the user should pay .
(5) Payment function . According to the amount paid by the user , modify “ Property fee payable ”.
(6) Statistical function : Be able to count all outstanding property fees by building number . According to the amount of arrears , Sort all user information from large to small .
(7) Manage with menu
Two 、 Function display

3、 ... and 、 Mind mapping


Four 、 Program source code
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<malloc.h>
#include<conio.h> // Function declaration //
int mainmenu(); // The main menu
void xinximenu(); // Property information menu
void tongjimenu();// Statistics query menu
void mychaozhao(); // List of arrears
void yezhumenu();// Owner menu
void wuyemenu();// Property menu
void myAdd1();// Enter the owner information
void myAdd2(); // Enter property information
void myDelete1();// Delete owner information
void myDelete2();// Delete property information
void myReplace1();// Modify the owner's information
void myReplace2();// Modify property information
void Display1();// Browse the owner information
void Display2();// Browse property information
void myfind();// Check payment
void Display(struct wuye *p);
void Read1();
void Read2();
void save1(struct yezhu *p);// Save owner information to file
void save2(struct wuye *p);// Save property information to file
struct yezhu *find1(char *id); // Find the owner information
struct wuye *find2(char *id);// Find property information `
struct yezhu *myAdd3(struct yezhu *p);// Add owner information
struct wuye *myAdd4(struct wuye *p);
struct yezhu {
// Owner's structure //
char id[100];
char name[20];
char sex[5];
int phone_num;
int floor_num;
char room_num[100];
float lost;
int area;
char rz_time[20];
char bz[100];
struct yezhu *next;
};
struct wuye {
// Property information structure //
char ID[100];
int last_year;
int last_month;
float money;
int to_time;
struct wuye *link;
};
struct yezhu *phead; // Owner's head node
struct wuye *pHead; // Property head node
int mainmenu()// The main menu //
{
int n;
printf("************************** Welcome to the community property management system ***************************\n");
printf("-----------------------------------------------------------------------------\n");
printf("* * * * * * * * * * * * * * * 〓 Please select 〓13* * * * * * * * * * * * * * *\n");
printf("* *\n"); printf("* *\n");
printf("* ⒈ Property information system *\n");
printf("* *\n");
printf("* ⒉ Statistical query system *\n");
printf("* *\n");
printf("* ⒊ Exit procedure . *\n");
printf("* *\n");
printf("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n");
printf(" Please enter the options *№:");
scanf("%d",&n);
return n;
}
void xinximenu()// The property information menu displays //
{
int choose;
do {
("***************************** matter trade Letter Rest system system ************************************\n");
printf("-----------------------------------------------------------------------------\n");
printf("* * * * * * * * * * * * * * * 〓 Please select 〓13* * * * * * * * * * * * * * *\n");
printf("* *\n");
printf("* *\n");
printf("* ⒈ Community owner information management *\n");
printf("* *\n");
printf("* ⒉ Property expense information management *\n");
printf("* *\n");
printf("* ⒊ Back to main menu . *\n");
printf("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n");
printf(" Please enter the options *№:");
scanf("%d",&choose);
switch(choose)
{
case 1:yezhumenu();
break;
case 2:wuyemenu();
break;
case 3:return;
default:printf(" Input error Please re-enter \n");
}
} while(1); }
void tongjimenu() // The statistics query menu displays //
{
int choose;
{
printf("****************************** system meter check Inquiry system system ***********************************\n");
printf("-----------------------------------------------------------------------------\n");
printf("* * * * * * * * * * * * * * * 〓 Please select 〓13* * * * * * * * * * * * * * *\n");
printf("* *\n");
printf("* *\n");
printf("* ⒈ Query payment information *\n");
printf("* *\n");
printf("* ⒉ List of arrears *\n");
printf("* *\n");
printf("* ⒊ Back to main menu . *\n");
printf("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n");
printf(" Please enter the options *№:");
scanf("%d",&choose);
switch(choose)
{
case 1 : myfind();
break;
case 2 : mychaozhao();
break;
case 3 : return;
default: printf(" Input error Please re-enter !\n\n");
}
}
}
void yezhumenu() // Owner menu function
{
int choose;
do {
printf("******************************** Owner information editing system ******************************-\n");
printf("-------------------------------------------------------------------------------\n");
printf("* * * * * * * * * * * * * * * *〓 Please select 〓15* * * * * * * * * * * * * * *\n");
printf("* *\n");
printf("* *\n");
printf("* ⒈ Owner information entry *\n");
printf("* *\n");
printf("* ⒉ Owner information modification *\n");
printf("* *\n");
printf("* ⒊ The owner information is deleted *\n");
printf("* *\n");
printf("* ⒋ Browse the owner's information *\n");
printf("* *\n");
printf("* ⒌ Go back to the upper menu . *\n");
printf("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n");
printf(" Please enter the option *№");
scanf("%d",&choose);
//getchar();
switch(choose)
{
case 1 :myAdd1();
break;
case 2 :myReplace1();
break;
case 3 :myDelete1();
break;
case 4 :Display1();
break;
case 5 : return;
default: printf(" Input error Please re-enter \n");
}
} while(1);
}
void myAdd1()// Enter the owner information //
{
struct yezhu *p;
p=(struct yezhu *)malloc(sizeof(struct yezhu));
printf(" Please enter the owner information \n");
printf("ID:");
scanf("%s",p->id);
printf(" full name :");
scanf("%s",p->name);
printf(" Gender ");
scanf("%s",&p->sex);
printf(" contact number ");
scanf("%d",&p->phone_num);
printf(" Building number ");
scanf("%d",&p->floor_num);
printf(" Unit room number :");
scanf("%s",p->room_num);
printf(" Property price per square meter :");
scanf("%d",&p->area);
printf(" Property fee payable ");
scanf("%s",p->rz_time);
printf(" remarks ");
scanf("%s",p->bz);
myAdd3(p);
savel(p);
printf(" Input succeeded !\n");
}
struct yezhu *myAdd3(struct yezhu *p)// Add the owner information node //
{
struct yezhu *t;
if(phead==NULL)
{
phead=p;
p->next=NULL;
}
else
{
t=phead;
while(t->next!=NULL)
t=t->next;
t->next=p;
p->next=NULL;
return phead;
}
}
void myReplace1()// Modify the owner's information
{
struct yezhu *k;
char id[100];
printf(" Please enter the owner to be modified ID:");
scanf("%s",id);
k=find1(id);
if(k!=NULL)
{
printf(" Please enter the owner information to be modified \n");
printf("ID:");
scanf("%s",k->id);
printf(" full name :");
scanf("%s",k->name);
printf(" Gender ");
scanf("%d",&k->sex);
printf(" contact number ");
scanf("%d",&k->phone_num);
scanf("%d",&k->phone_num);
printf(" Building number ");
scanf("%d",&k->floor_num);
printf(" Unit room number :");
scanf("%s",k->room_num);
printf(" Property price per square meter :");
scanf("%d",&k->area);
printf(" Property fee payable ");
scanf("%s",k->rz_time);
printf(" remarks ");
scanf("%s",k->bz);
savel(k);
printf(" Modification successful !\n");
}
else
{
printf(" No such owner ID!\n");
return;
}
}
struct yezhu *find1(char *id)// adopt ID Find the owner information //
{
struct yezhu *p;
p=phead;
while(p!=NULL)
{
if(strcmp(p->id,id)==0)
return p;
p=p->next;
}
return NULL;
}
void Display1()
{
struct yezhu *p;
p=phead;
p=phead;
while(p!=NULL)
{
printf("\n\n");
printf("ID:%s\n",p->id);
printf(" full name :%s\n",p->name);
printf(" Gender :%d\n",p->sex);
printf(" contact number %d\n",p->phone_num);
printf(" Building number %d\n",p->floor_num);
printf(" Unit room number :%s\n",p->room_num);
printf(" Property price per square meter :%d\n",p->area);
printf(" Property fee payable %s\n",p->rz_time);
printf(" remarks %s\n",p->bz);
printf("\n\n");
p=p->next;
}
}
void myDelete1()
{
struct yezhu *p,*pp;
struct wuye *k,*kk;
char id[100];
pp=phead;
kk=pHead;
printf(" Please enter the name of the person you want to delete ID:");
scanf("%s",id);
p=find1(id);
k=find2(id);
if(p!=NULL)
{
if(p==phead)
{
phead=p->next;
free(p);
}
else
{
while(pp->next!=p)
pp=pp->next;
pp->next=p->next;
free(p);
}
}
else
{
printf(" No such owner ID!\n");
return;
}
printf(" The owner information was deleted successfully !\n");
savel(p);
if(k!=NULL)
{
if(k==pHead)
{
pHead=k->link;
free(k);
}
else
{
while(kk->link!=k)
kk=kk->link;
kk->link=k->link;
free(k);
}
}
else
{
printf(" No such owner ID!\n");
return;
}
printf(" Property information deleted successfully !\n");
savew(k);
}
void savel(struct yezhu *p)
{
FILE *fp; // Open file //
fp=fopen("yezhu.dat","wb");
p=phead;
while(p!=NULL)
{
fwrite(p,sizeof(struct yezhu),1,fp); // Write a block of data to a file //
p=p->next;
}
fclose(fp);
}
void Read1() // File operation reads data //
{
FILE *fp;
struct yezhu *p;
fp=fopen("yezhu.dat","rb");
while(1)
{
p=(struct yezhu *)malloc(sizeof(struct yezhu)); // First calculate the bytes and then apply to the system for allocating byte memory space //
if(feof(fp)) // End of file //
{
break;
}
if(fread(p,sizeof(struct yezhu),1,fp)) // Reading data //
{
myAdd3(p);
}
}
fclose(fp);
}
void wuyemenu()
{
int choose=0;
do {
printf("********************************* Property cost management system ************************\n");
printf("-------------------------------------------------------------------------\n");
printf("* * * * * * * * * * * * * * * 〓 Please select 〓15* * * * * * * * * * * * *\n");
printf("* * \n");
printf("* *\n");
printf("* ⒈ Property information entry *\n");
printf("* *\n");
printf("* ⒉ Property information modification *\n");
printf("* *\n");
printf("* ⒊ Property information deleted *\n");
printf("* *\n");
printf("* ⒋ Property information browsing *\n");
printf("* *\n");
printf("* ⒌ Go back to the upper menu . *\n");
printf("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n");
printf(" Please enter the option ");
scanf("%d",&choose);
switch(choose)
{
case 1: myAdd2();
break;
case 2: myReplace2();
break;
case 3: myDelete2();
break;
case 4: Display2();
break;
case 5: return;
default:printf(" Input error Please re-enter \n");
}
} while(1);
}
void myAdd2()// Enter property information //
{
struct wuye *p;
struct yezhu *t;
int x;
p=(struct wuye *)malloc(sizeof(struct wuye));
printf(" Please enter the property information \n");
printf("ID:");
scanf("%s",p->ID);
t=find1(p->ID);
if(t!=NULL)
{
printf(" Last payment year ");
scanf("%d",&p->last_year);
printf(" month ");
scanf("%d",&p->last_month);
printf(" Payment amount ");
scanf("%f",&p->money);
x=p->money/(0.4*t->area);
p->to_time=(int)x;
myAdd4(p);
savew(p);
printf(" Input succeeded !\n");
}
else
{
printf(" No such owner ID!\n");
return;
}
}
struct wuye *myAdd4(struct wuye *p)// Add a property information node //
{
struct wuye *t;
if(pHead==NULL)
{
pHead=p;
p->link=NULL;
}
else
{
t=pHead;
while(t->link!=NULL)
t=t->link;
t->link=p;
p->link=NULL;
}
return pHead;
}
struct wuye *find2(char *id)// Find payment information by name //
{
struct wuye *p;
p=pHead;
while(p!=NULL)
{
if(strcmp(p->ID,id)==0)
return p;
p=p->link;
}
return NULL;
}
void myfind()
{
struct wuye *p;
char a[100];
printf(" Please enter the owner you want to find id");
scanf("%s",a);
p=find2(a);
if(p!=NULL)
{
printf(" The owner has deposited !\n");
}
else
{
printf(" The owner has not deposited the payment information yet !\n");
return;
}
myDisplay(p);
}
void myReplace2()//
{
char id[20];
int x;
struct wuye *k;
struct yezhu *t;
printf(" Please enter the owner to be modified ID:");
scanf("%s",id);
if(k!=NULL)
{
printf(" The information you want to modify is \n");
printf(" Please enter new information \n");
printf("ID:");
scanf("%s",k->ID);
printf(" Last payment year ");
scanf("%d",&k->last_year);
printf(" month ");
scanf("%d",&k->last_month);
printf(" Payment amount ");
scanf("%f",&k->money);
t=find1(k->ID);
x=(int)k->money/(0.4*t->area);
k->to_time=(int)x;
myAdd4(k);
savew(k);
printf(" Modification successful !\n");
}
else
{
printf(" No such owner ID!\n");
return;
}
}
void myDelete2()//
{
struct wuye *p,*pp;
char id[100];
pp=pHead;
printf(" Please enter the name of the person you want to delete ID:");
scanf("%s",id);
p=find2(id);
if(p!=NULL)
{
if(p==pHead)
{
pHead=p->link;
free(p);
}
else
{
while(pp->link!=p)
pp=pp->link;
pp->link=p->link;
free(p);
}
}
else
{
printf(" No such owner ID!\n");
return;
}
savew(p);
printf(" Delete successful !\n");
}
void Display2()
{
struct wuye *p;
p=pHead;
while(p!=NULL)
{
printf("ID:%s\n",p->ID);
printf(" most after One Time Pay in fee Japan period %d year %d month \n",p->last_year,p->last_month);
printf(" Payment amount :%f element \n",p->money);
printf(" Period of validity of the fee %d Months \n",p->to_time);
printf("\n\n\n");
p=p->link;
}
}
void myDisplay(struct wuye *p)
{
printf(" The owner ID:%s\n",p->ID);
printf(" most after One Time Pay in fee Japan period %d year %d month \n",p->last_year,p->last_month);
printf(" Last payment amount %f\n",p->money);
printf(" Period of validity of the fee %d Months \n",p->to_time);
}
void Read2()//
{
FILE *fp;
struct wuye *p;
fp=fopen("wuye.dat","rb");
while(1)
{
p=(struct wuye *)malloc(sizeof(struct wuye));
if(feof(fp))
break;
if(fread(p,sizeof(struct wuye),1,fp))
myAdd4(p);
}
fclose(fp);
}
void savew(struct wuye *p)//
{
FILE *fp; fp=fopen("wuye.dat","wb");
p=pHead;
while(p!=NULL)
{
fwrite(p,sizeof(struct wuye),1,fp);
p=p->link;
}
fclose(fp);
}
void mychaozhao()//
{
int year,month;
struct wuye *k;
struct yezhu *l;
k=pHead;
l=phead;
printf(" Please enter the current year ");
scanf("%d",&year);
printf(" Please enter the current month ");
scanf("%d",&month);
while(k!=NULL)
{
if(year>k->last_year)
{
l=find1(k->ID);
l->lost=(float)(month+12-k->to_time-k->last_month)*(0.4*l->area);
if(l->lost>0)
{
printf(" The owner ID*:%s\n",l->id);
printf(" Name of the employer *%s\n",l->name);
printf(" Last payment date %d year %d month \n",k->last_year,k->last_month);
printf(" The amount owed *%f\n",l->lost);
printf("\n\n");
}
}
if(year==k->last_year)
{
l=find1(k->ID);
l->lost=(float)(month-k->to_time-k->last_month)*(0.4*l->area);
if(l->lost>0)
{
printf(" The owner ID:%s\n",l->id);
printf(" Name of the employer %s\n",l->name);
printf(" Last payment date %d year %d month \n",k->last_year,k->last_month);
printf(" Owe fee gold forehead %f\n",l->lost);
printf("\n\n");
}
}
k=k->link;
}
}
int main()//
{
int m;
//Read1();// No information for the first time Unavailable
//Read2();// No information for the first time Unavailable
do {
m=mainmenu();
switch(m)
{
case 1: xinximenu();
break;
case 2: tongjimenu();
break;
case 3:printf("***************************** Thank you for using. , bye !***********************************\n"); exit(0);
}
} while(1);
return 1;
}

You can pay attention to it, and it will be updated continuously in the future 0.0( Thank you first )
边栏推荐
- 高阶-二叉搜索树详解
- [ManageEngine Zhuohao] mobile terminal management solution, helping the digital transformation of Zhongzhou aviation industry
- 【企业数据安全】升级备份策略 保障企业数据安全
- What is a port scanning tool? What is the use of port scanning tools
- Recueillir des trésors dans le palais souterrain (recherche de mémoire profonde)
- [file system] how to run squashfs on UBI
- 高阶-二叉平衡树
- Transformer le village de tiantou en un village de betteraves sucrières
- 【#Unity Shader#自定义材质面板_第二篇】
- Redis安装到Windows系统上的详细步骤
猜你喜欢

C语言课设物业费管理系统(大作业)

To sort out the anomaly detection methods, just read this article!

SQL语句

Tidb single machine simulation deployment production environment cluster (closed pit practice, personal test is effective)

【ManageEngine】如何实现网络自动化运维

DHT11 temperature and humidity sensor

Ant new village is one of the special agricultural products that make Tiantou village in Guankou Town, Xiamen become Tiantou village

C语言课设职工信息管理系统(大作业)

ManageEngine卓豪助您符合ISO 20000标准(四)

High order binary search tree
随机推荐
SystemVerilog learning-06-class encapsulation
C语言课设图书信息管理系统(大作业)
How does MySQL store Emoji?
局域网监控软件有哪些功能
让田头村变甜头村的特色农产品是仙景芋还是白菜
Minio error correction code, construction and startup of distributed Minio cluster
地宮取寶(記憶化深搜)
ABP 学习解决方案中的项目以及依赖关系
[ManageEngine Zhuohao] mobile terminal management solution, helping the digital transformation of Zhongzhou aviation industry
C语言课设工资管理系统(大作业)
虚幻 简单的屏幕雨滴后处理效果
JDBC database operation
Mongodb: I. what is mongodb? Advantages and disadvantages of mongodb
记磁盘扇区损坏导致的Mysql故障排查
【Unity Shader 描边效果_案例分享第一篇】
[ManageEngine Zhuohao] use unified terminal management to help "Eurex group" digital transformation
Treasure taking from underground palace (memory based deep search)
【ManageEngine卓豪】用统一终端管理助“欧力士集团”数字化转型
SystemVerilog learning-07-class inheritance and package use
Highmap gejson data format conversion script