Product warehousing management operating system
catalogue
Product warehousing management operating system
3, Screenshot of operation results
2. Enter the record of warehousing information
3. Displays all records in the specified format
4. Search the record according to the warehousing product number
5. Delete records according to stock in number
6. Display the record from small to large according to the warehousing product number
7. Count the total amount of all production and warehousing products
5, Other final course design systems (open source)
6, Attachment / download address
C language final course design
1, Description
hello everyone! I'm Xiao Yuzai. Today I'd like to share with you the final course design of C & C + + - product warehousing management operating system. This program is written in C + + & C language, and the running environment is visual C++ 6.0, it realizes the management function of product warehousing operation: input the records of warehousing information, display all records in the specified format, search the records according to the warehousing product number, search the records according to the warehousing date, delete the records according to the warehousing number, display the records from small to large according to the warehousing product number, count the total amount of all production warehousing products, etc, It is a good reference for learning C + + programs. The system runs in the command line window without visual interface and MFC class library. If friends use it to learn or do C + + final course design homework, it must be OK. I'll share it with you!!! If you feel good, remember to give three company!!! Pro test is effective!!!
Especially remember: the password entered after running the program is: 123
If you have any questions or comments, please contact me immediately:
CSDN:Little baby_ CSDN bloghttps://blog.csdn.net/m0_46843484?spm=1000.2115.3001.5343
Copyright notice: unless otherwise stated, the copyright of all articles on this blog belongs to the author. Reprint please indicate the source!
2, Function realization
1. Enter the record of warehousing information
2. Displays all records in the specified format
3. Search the record according to the warehousing product number
4. Find records based on receipt date
5. Delete records according to stock in number
6. Display the record from small to large according to the warehousing product number
7. Count the total amount of all production and warehousing products
8. Program end
3, Screenshot of operation results
1. System main interface
2. Enter the record of warehousing information
3. Displays all records in the specified format
4. Search the record according to the warehousing product number
5. Delete records according to stock in number
6. Display the record from small to large according to the warehousing product number
7. Count the total amount of all production and warehousing products
4, Program source code
If you establish a good development environment and copy the code directly, you can run it! Pro test valid!!!
#include<stdio.h> #include "stdlib.h" #include "string.h" #define N 10 struct information { int num1;//Warehousing No// int rklx;//Warehousing type// int num2;//Warehousing product No// int sj1[3];//Production date// float dj;//Unit price of warehoused products// int sl;//Warehousing product quantity// int num3;//Warehouse No// char name[10];//Handler// int sj2[3];//Warehousing date// };struct information inf[N]; /******************************************************* Function: login function, verify password Parameters: Parameter 1: password Type: char [] Description: the user enters the password Return value: 1 or 0 Type: int Note: 1 means passing the verification; 0 means no pass *******************************************************/ int login(char password[]) { static char key[10]="123"; if(strcmp(password,key)==0) return 1; else return 0; } /******************************************************* Function: read information from file to structure array Parameters: Parameter 1: information Type: inf [] Description: used to store management information read from files Return value: i Type: int Description: indicates the number of actually read data *******************************************************/ int readFromFile(struct information inf[]) { FILE *fp=NULL; int i=0; fp=fopen("FILENAME.txt","rb"); /*Open file*/ if(fp!=NULL) { while(!feof(fp)) /*Read students from files*/ { if(i>=N) break; if(fread(inf+i,sizeof(struct information),1,fp)) i++; } fclose(fp); } return i; } /******************************************************* Function: output the management information in the structure array to the file Parameters: Parameter 1: information Type: inf [] Description: used to store management information read from files Parameter 2: length Type: int Description: indicates the length of the actual array Return value: None *******************************************************/ void writeToFile(struct information inf[],int length) { FILE *fp=NULL; int i=0; fp=fopen("FILENAME.txt","wb"); if(fp==NULL) { printf("Error opening file!\n"); exit(0); } for(i=0;i<length;i++) fwrite(inf+i,sizeof(struct information),1,fp); fclose(fp); } /******************************************************* Function: delete records according to the stock in number Parameters: Parameter 1: information Type: inf [] Description: an array used to store management information Parameter 2: length Type: int Description: indicates the length of the actual array Parameter 3: delete_num1 Type: int Note: indicates that the record to be deleted from the receipt No Return value: length Number of information after deletion *******************************************************/ int delete_inf(struct information inf[],int delete_num1,int length) { int i,j; char choice; for(i=0;i<length;i++) { if(delete_num1==inf[i].num1) { printf("Found it!Its subscript is:%d\n", i); printf("The warehousing product number is: %d\n",inf[i].num2); printf("The warehousing number is: %d\n",inf[i].num1); printf("date of manufacture: %d year%d month%d day\n",inf[i].sj1[0],inf[i].sj1[1],inf[i].sj1[2]); printf("Warehousing date is: %d year%d month%d day\n",inf[i].sj2[0],inf[i].sj2[1],inf[i].sj2[2]); printf("Warehouse No: %d\n",inf[i].num3); printf("Handled by: %s\n",inf[i].name); printf("The unit price of warehoused products is: %2.1f\n",inf[i].dj); printf("The quantity of warehousing products is: %d\n",inf[i].sl); printf("\n\n"); break; } } if(i<length) { printf("Are you sure you want to delete this stock in number?(Y/N)\n"); getchar(); scanf("%c",&choice); if(choice=='Y'||choice=='y') { for(j=i;j<length;j++) inf[j]=inf[j+1]; length=length-1; printf("Delete succeeded!\n"); } } else printf("\n The specified stock in number does not exist!\n"); return length; } /********************************************************** Function: print records Parameter 1: information Type: inf [] Description: an array used to store management information Parameter 2: length Type: int Description: indicates the length of the actual array Return value: None **********************************************************/ void print(struct information inf[],int length) { int i; for(i=0;i<length;i++) { printf("The warehousing product number is: %d\n",inf[i].num2); printf("The warehousing number is: %d\n",inf[i].num1); printf("date of manufacture: %d year%d month%d day\n",inf[i].sj1[0],inf[i].sj1[1],inf[i].sj1[2]); printf("Warehousing date is: %d year%d month%d day\n",inf[i].sj2[0],inf[i].sj2[1],inf[i].sj2[2]); printf("Warehouse No: %d\n",inf[i].num3); printf("Handled by: %s\n",inf[i].name); printf("The unit price of warehoused products is: %2.1f\n",inf[i].dj); printf("The quantity of warehousing products is: %d\n",inf[i].sl); printf("\n\n"); } } /******************************************************* Function: display the record from small to large according to the warehousing product number Parameters: Parameter 1: information Type: inf [] Description: an array used to store management information Parameter 2: length Type: int Description: indicates the length of the actual array Return value: None *******************************************************/ void pailian(struct information inf[],int length) { struct information inf1[N]; int i,j,k; for(i=0;i<length-1;i++) { k=i; for(j=i+1;j<length;j++) if(inf[k].num2>inf[j].num2) k=j; if(k!=i) { inf1[N+1]=inf[i]; inf[i]=inf[k]; inf[k]=inf1[N+1]; } } } /******************************************************* Function: judge whether the stock in number is unique Parameters: Parameter 1: information Type: inf [] Description: an array for storing management information Parameter 2: length Type: int Description: indicates the length of the actual array Parameter 3: peoinf Type: int Note: the stock in number to be judged Return value: 1 or 0(flag) Type: int Note: 1 means the stock in number is unique; 0 indicates that the stock in number is not unique *******************************************************/ int unique(struct information inf[],int length,int peoinf) { int flag=1,i; for(i=0;i<length;i++) { if(inf[i].num1==peoinf) { flag=0; break; } } return (flag); } /******************************************************* Function: statistics the total amount of all production receipt products Parameter 1: information Type: inf [] Description: an array used to store management information Parameter 2: length Type: int Description: indicates the length of the actual array Parameter 3: t Type: float Note: the total amount of all production warehousing products Return value: t *******************************************************/ float add(struct information inf[],int length) { float t=0; int i; for(i=0;i<length;i++) t+=inf[i].dj*inf[i].sl; return(t); } /******************************************************* Function: input information into structure array Parameters: Parameter 1: information Type: inf [] Description: an array used to store management information Parameter 2: length Type: int Description: indicates the length of the actual array Return value: i Type: int Description: indicates the length of the actual array after adding information *******************************************************/ int f1(struct information inf[],int Length) { int i=Length; int endFlag=0; int flag; printf("Please enter the product warehousing operation management system (ending with warehousing number 0):\n"); while(i<N) { while(1) { printf("Please enter the stock in number: \n"); scanf("%d",&inf[i].num1); if(inf[i].num1==0) { endFlag=1; break; } flag=unique(inf,i,inf[i].num1); if(flag) break; printf("This information already exists, please re-enter!\n"); } if(endFlag==1)break; printf("Please select receipt type: \n"); printf("++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); printf("* *\n"); printf("* 1: Purchase warehousing 2: Production warehousing 3: Warehousing products *\n"); printf("* *\n"); printf("++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); scanf("%d",&inf[i].rklx); switch(inf[i].rklx) { case 1:printf(" Purchase warehousing\n Customer number is supplier");break; case 2:printf("Purchase warehousing\n");break; case 3:printf("Purchase warehousing\n Customer number is return receipt");break; default:printf("error\n"); } printf("Please enter the warehousing product number: \n"); scanf("%d",&inf[i].num2); printf("Please enter the production date: \n"); printf("Production year:\n"); scanf("%d",&inf[i].sj1[0]); printf("Production month:\n"); scanf("%d",&inf[i].sj1[1]); printf("Production date:\n"); scanf("%d",&inf[i].sj1[2]); printf("Please enter the unit price of warehousing products: \n"); scanf("%f",&inf[i].dj); printf("Please enter the quantity of products in stock: \n"); scanf("%d",&inf[i].sl); printf("Please enter warehouse number: \n"); scanf("%d",&inf[i].num3); printf("Please enter the operator: \n"); scanf("%s",&inf[i].name); printf("Please enter the warehousing date: \n"); printf("Warehousing year:\n"); scanf("%d",&inf[i].sj2[0]); printf("Warehousing month:\n"); scanf("%d",&inf[i].sj2[1]); printf("Warehousing date:\n"); scanf("%d",&inf[i].sj2[2]); while(getchar()!='\n') continue; i++; } return i;//How many pieces of information are in the array after adding } /******************************************************* Function: search records according to the warehousing product number Parameters: Parameter 1: information Type: inf [] Description: an array used to store management information Parameter 2: length Type: int Description: indicates the length of the actual array Parameter 3: infnum Type: int Description: indicates the receipt product number to be searched Return value: None *******************************************************/ void queryInfo(struct information inf[],int length,int infnum) { int i=0; for(i=0;i<length;i++) { if(infnum==inf[i].num2) { printf("Found it! All its records are\n"); printf("The warehousing product number is: %d\n",inf[i].num2); printf("The warehousing number is: %d\n",inf[i].num1); printf("date of manufacture: %d year%d month%d day\n",inf[i].sj1[0],inf[i].sj1[1],inf[i].sj1[2]); printf("Warehousing date is: %d year%d month%d day\n",inf[i].sj2[0],inf[i].sj2[1],inf[i].sj2[2]); printf("Warehouse No: %d\n",inf[i].num3); printf("Handled by: %s\n",inf[i].name); printf("The unit price of warehoused products is: %2.1f\n",inf[i].dj); printf("The quantity of warehousing products is: %d\n",inf[i].sl); break; } } if(i>=length) printf("\n non-existent!\n"); } /******************************************************* Function: find data from the array according to the date Parameters: Parameter 1: information Type: inf [] Description: an array used to store management information Parameter 2: length Type: int Description: indicates the length of the actual array Parameter 3: year Type: int Description: indicates the year to find Parameter 4: month Type: int Description: indicates the month to find Parameter 5: day Type: int Description: indicates the date to find Return value: None *******************************************************/ void rukuriqi(struct information inf[],int length,int year,int month,int day) { int i=0; int found=0; if(!(year>=1949&&year<=2010&&month>=0&&month<=12&&day>=0&&day<=31)) printf("Input error!!"); else if(year>=1949&&year<=2010&&month>=0&&month<=12&&day>=0&&day<=31) { for(i=0;i<length;i++) { if(inf[i].sj2[0]==year&&inf[i].sj2[1]==month&&inf[i].sj2[2]==day) { found++; if(found==1) printf("Found it! All its records are\n"); printf("The warehousing product number is: %d\n",inf[i].num2); printf("The warehousing number is: %d\n",inf[i].num1); printf("date of manufacture: %d year%d month%d day\n",inf[i].sj1[0],inf[i].sj1[1],inf[i].sj1[2]); printf("Warehousing date is: %d year%d month%d day\n",inf[i].sj2[0],inf[i].sj2[1],inf[i].sj2[2]); printf("Warehouse No: %d\n",inf[i].num3); printf("Handled by: %s\n",inf[i].name); printf("The unit price of warehoused products is: %2.1f\n",inf[i].dj); printf("The quantity of warehousing products is: %d\n",inf[i].sl); printf("\n"); } } if(found==0) printf("sorry!!!Can't find!!!\n"); } } /******************************************************* Function: display all records in the specified format Parameters: Parameter 1: information Type: inf [] Description: an array used to store management information Parameter 2: length Type: int Description: indicates the length of the actual array Parameter 3: j Type: int Description: indicates the receipt number to be searched Return value: None *******************************************************/ void zhidinggeshi(struct information inf[],int j,int length) { int i; if(j==1) { for(i=0;i<length;i++) printf("The warehousing number is%d\n",inf[i].num1); } if(j==2) { for(i=0;i<length;i++) printf("Warehousing product No%d\n",inf[i].num2); } if(j==3) { for(i=0;i<length;i++) printf("Production date is%d year%d month%d day\n",inf[i].sj1[0],inf[i].sj1[1],inf[i].sj1[2]); } if(j==4) { for(i=0;i<length;i++) printf("The unit price of warehoused products is%f\n",inf[i].dj); } if(j==5) { for(i=0;i<length;i++) printf("Warehousing date is%d year%d month%d day\n",inf[i].sj2[0],inf[i].sj2[1],inf[i].sj2[2]); } if(j==6) { for(i=0;i<length;i++) printf("The quantity of warehousing products is%d\n",inf[i].sl); } if(j==7) { for(i=0;i<length;i++) printf("Warehouse No%d\n",inf[i].num3); } if(j==8) { for(i=0;i<length;i++) printf("Handled by%s\n",inf[i].name); } while(getchar()!='\n') continue; } /******************************************************* Function: display menu Parameter: None Return value: None *******************************************************/ void main() { struct information inf[N]; int length=0; int i,s=0; char password[10]; /*====Verify the user's password until it is correct====*/ do{ printf("Please enter the password:"); scanf("%s",&password); s=login(password); }while(s==0); length=readFromFile(inf); while(1) { printf("\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); printf("+ Product warehousing operation management system +\n"); printf("+ +\n"); printf("+ 1. Input warehousing information record +\n"); printf("+ 2. Displays all records in the specified format +\n"); printf("+ 3. Search the record according to the warehousing product number +\n"); printf("+ 4. Find records based on receipt date +\n"); printf("+ 5. Delete records according to stock in number +\n"); printf("+ 6. Display the record from small to large according to the warehousing product number +\n"); printf("+ 7. Count the total amount of all production and warehousing products +\n"); printf("+ 8. Program end +\n"); printf("+ +\n"); printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); printf("Please enter the sequence number of the instruction you want to operate:\n"); scanf("%d",&i); int j,infnum,delete_num1; int year,month,day,t1=1; switch(i) { float add_money; char choice; case 1: length=f1(inf,length); printf("\n existing%d Information\n",length); writeToFile(inf,length); break; case 2: while(t1) { printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); printf("* *\n"); printf("* 1: Warehousing No 2: Warehousing product No *\n"); printf("* 3: date of manufacture 4: Unit price of warehoused products *\n"); printf("* 5: Warehousing date 6: Warehousing product quantity *\n"); printf("* 7: Warehouse No 8: Handler *\n"); printf("* *\n"); printf("++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); printf("Please enter the serial number you want to operate\n"); scanf("%d",&j); zhidinggeshi(inf,j,length); printf("Do you want to continue entering(y/n)\n"); scanf("%c",&choice); if(choice=='y'||choice=='Y') t1=1; else t1=0; } t1=1; break; case 3: while(t1) { printf("Please enter the warehousing product number to be checked: "); scanf("%d",&infnum); queryInfo(inf,length,infnum); getchar(); printf("Do you want to continue searching(y/n)\n"); scanf("%c",&choice); if(choice=='y'||choice=='Y') t1=1; else t1=0; } t1=1; break; case 4: while(t1) { printf("Find records based on receipt date\n"); printf("Please enter the warehousing date: \n"); printf("Warehousing year:\n"); scanf("%d",&year); printf("Warehousing month:\n"); scanf("%d",&month); printf("Warehousing date:\n"); scanf("%d",&day); rukuriqi(inf,length,year,month,day); getchar(); printf("Do you want to continue searching(y/n)\n"); scanf("%c",&choice); if(choice=='y'||choice=='Y') t1=1; else t1=0; } t1=1; break; case 5: while(t1) { printf("Delete records according to stock in number\n"); printf("Please enter the stock in number to delete\n"); scanf("%d",&delete_num1); length=delete_inf(inf,delete_num1,length); printf("\n Now there are%d Information\n",length); writeToFile(inf,length); getchar(); printf("Do you want to continue deleting records(y/n)\n"); scanf("%c",&choice); if(choice=='y'||choice=='Y') t1=1; else t1=0; } t1=1; break; case 6: printf("Display the record from small to large according to the warehousing product number\n"); pailian(inf,length); print(inf,length); writeToFile(inf,length); printf("Rehearsal succeeded!\n\n"); break; case 7: printf("Count the total amount of all production and warehousing products\n"); add_money=add(inf,length); printf("The total amount of production warehousing products is %5.4f\n",add_money); break; case 8: writeToFile(inf,length); getchar(); printf("Are you sure you want to end(y/n)\n"); scanf("%c",&choice); if(choice=='y'||choice=='Y') break; else exit(0); default: printf("error\n"); } } }
5, Other final course design systems (open source)
C & C + + final course design -- student performance management source code_ Xiaotuzi CSDN blog
C & C + + final course design -- library management system source code_ Xiaotuzi CSDN blog
6, Attachment / download address
be careful
The download address of "25 +" C + + & & C language final course design (super detailed) is attached below. The introduction of each system introduces the implementation function of the system in detail, and you can find what you need according to the function.
C & C + + final course design
C & C + + - file grade (source code) - C/C + + Document Resources - CSDN Library
C language final course design
- Copyright notice: unless otherwise stated, the copyright of all articles on this blog belongs to the author. Reprint please indicate the source!