欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

Java讀者信息添加代碼,java讀者信息添加代碼是什么

用JAVA設(shè)計一個通訊錄,保存讀者信息。

wowo我又寫了一半的代碼,完成了添加用的是窗口的圖形化界面,要么??

讓客戶滿意是我們工作的目標,不斷超越客戶的期望值來自于我們對這個行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價值的長期合作伙伴,公司提供的服務(wù)項目有:域名注冊、虛擬空間、營銷軟件、網(wǎng)站建設(shè)、奉新網(wǎng)站維護、網(wǎng)站推廣。

JAVA版的圖書管理系統(tǒng)

送你一份代碼,結(jié)構(gòu)大致按照你的需求了,自己增加一些小功能,不會的話請教你同學(xué)。

分給我,錢就不用了。

#include string.h

#define FORMAT "\n%-8d%-8d%-7d%-8d%-7d%-8d%-10s%-9s%-9s\n"

#include stdio.h

#include conio.h

#include malloc.h

#define NULL 0

#define N 100

#define LEN sizeof(struct book)

int M;

struct book

{int Enum;

int Cnum;

char name[10];

char author[10];

char publishor[30];

struct date

{int year;

int month;

int day;}time;

int price;

struct book*next;

}go[N];

void print()

{printf("---------------------------------------------------------------------------\n");

printf("Enum Cnum year month day price name author publishor\n");

printf("---------------------------------------------------------------------------\n");

}

void load()

{FILE *fp;

int i;

if((fp=fopen("book_list","rb"))==NULL)

{printf("cannot open file\n");

return;

}

i=0;

while((fread(go[i],sizeof(struct book),1,fp))!=NULL)

{i++;}

M=i;

fclose(fp);

}

void save(int h)

{FILE *fp;

int i;

if ((fp=fopen("BOOK_LIS","wb"))==NULL)

{printf("cannot open file\n");

return;

}

for (i=0;ih;i++)

if(fwrite(go[i],sizeof(struct book),1,fp)!=1)

printf("file write error\n");

fclose(fp);

}

void f1()

{FILE *fp;

int i=0;

fp=fopen("book_list","rb");

print();

while((fread(go[i],sizeof(struct book),1,fp))!=NULL)

{printf(FORMAT,go[i].Enum,go[i].Cnum,go[i].time.year,go[i].time.month,go[i].time.day,go[i].price,go[i].name,go[i].author,go[i].publishor);

i++;

}

fclose(fp);

getch();

}

void f2(int h)

{int i;

printf("please input %d book's information\n",h);

printf("Enum Cnum year month day price name author publishor\n");

for(i=0;ih;i++)

{printf("Enum:\n");

scanf("%d",go[i].Enum);

printf("Cnum:\n");

scanf("%d",go[i].Cnum);

printf("please input year month day\n");

scanf("%d%d%d",go[i].time.year,go[i].time.month,go[i].time.day);

printf("price:\n");

scanf("%d",go[i].price);

printf("name:\n");

scanf("%s",go[i].name);

printf("author:\n");

scanf("%s",go[i].author);

printf("publishor:\n");

scanf("%s",go[i].publishor);

}

save(h);

return;

}

void f3()

{int i;

struct book;

char a[20],b[20],c[20];

load();

printf("please input 'name' or 'author':\n");

scanf("%s",a);

if(strcmp(a,"name")==0)

{printf("please input the book's name:\n");

scanf("%s",b);

for(i=0;iM;i++)

if(strcmp(b,go[i].name)==0)

{print();

printf(FORMAT,go[i].Enum,go[i].Cnum,go[i].time.year,go[i].time.month,go[i].time.day,go[i].price,go[i].name,go[i].author,go[i].publishor);

}

}

else

{printf("please input the book's author:\n");

scanf("%s",c);

for(i=0;iM;i++)

if(strcmp(c,go[i].author)==0)

{print();

printf(FORMAT,go[i].Enum,go[i].Cnum,go[i].time.year,go[i].time.month,go[i].time.day,go[i].price,go[i].name,go[i].author,go[i].publishor);

}

}

return;

}

void f4()

{int i,j,k;

struct book t;

load();

for(i=0;iM;i++)

{k=i;

for(j=i+1;jM;j++)

if(go[k].pricego[j].price)k=j;

t=go[i];go[i]=go[k];go[k]=t;

}

print();

for(i=0;iM;i++)

printf(FORMAT,go[i].Enum,go[i].Cnum,go[i].time.year,go[i].time.month,go[i].time.day,go[i].price,go[i].name,go[i].author,go[i].publishor);

}

void f5()

{FILE *fp;

int i,j,M,flag;

char name[10];

if((fp=fopen("book_list","rb"))==NULL)

{printf("cannot open file\n");

return;

}

printf("\norriginal data:\n");

print();

for(i=0;fread(go[i],sizeof(struct book),1,fp)!=0;i++)

printf(FORMAT,go[i].Enum,go[i].Cnum,go[i].time.year,go[i].time.month,go[i].time.day,go[i].price,go[i].name,go[i].author,go[i].publishor);

M=i;

printf("\n input the deleted name:\n");

scanf("%s",name);

for(flag=1,i=0;flagiM;i++)

{if(strcmp(name,go[i].name)==0)

{for(j=i;jM-1;j++)

{go[j].Enum=go[j+1].Enum;

go[j].Enum=go[j+1].Enum;

strcpy(go[j].name,go[j+1].name);

strcpy(go[j].author,go[j+1].author);

strcpy(go[j].publishor,go[j+1].publishor);

go[j].time.year=go[j+1].time.year;

go[j].time.month=go[j+1].time.month;

go[j].time.day=go[j+1].time.day;

go[j].price=go[j+1].price;

}

flag=0;

}

}

if(!flag)

M=M-1;

else

printf("not found!\n");

printf("\nNow,the content of file:\n");

fp=fopen("book_list","wb");

for(i=0;iM;i++)

fwrite(go[i],sizeof(struct book),1,fp);

fclose(fp);

fp=fopen("book_list","wb");

for(i=0;fread(go[i],sizeof(struct book),1,fp)!=0;i++);

printf(FORMAT,go[i].Enum,go[i].Cnum,go[i].time.year,go[i].time.month,go[i].time.day,go[i].price,go[i].name,go[i].author,go[i].publishor);

fclose(fp);

}

main()

{int i,h;

clrscr();

while(1)

{printf ("\n 1 is a project that can output all information.\n");

printf ("\n 2 is a project that can add any book's information.\n");

printf ("\n 3 is a project that can search information.\n");

printf ("\n 4 is a project that can sort.\n");

printf ("\n 5 is a project that can del.\n");

printf ("\n 6 is a project that can leave.\n");

printf("please input number:1 or 2 or 3 or 4 or 5 or 6\n");

scanf("%d",i);

switch (i)

{case 1:f1();break;

case 2:

{printf ("if you want to add book's information,please input a data:h=");

scanf("%d",h);

f2(h);}break;

case 3:

{f3();getch();}break;

case 4:{f4();getch();}break;

case 5:{f5();getch();}break;

case 6:exit (1);

}

clrscr();}

}

java顯示借閱多少代碼

java顯示借閱n加1的代碼。根據(jù)查詢相關(guān)信息顯示java讀者信息添加和讀者信息查詢與修改功能,用戶登錄成功之后,可以瀏覽所有讀者的信息,也可以檢索特定讀者的信息,同時,可以對讀者信息進行維護,包括增加、刪除及修改,具體信息包括讀者類型,讀者的類型決定著他可以借到書的最大數(shù)量和最大歸還天數(shù)。

網(wǎng)頁題目:Java讀者信息添加代碼,java讀者信息添加代碼是什么
本文鏈接:http://chinadenli.net/article18/dsgejdp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供靜態(tài)網(wǎng)站商城網(wǎng)站網(wǎng)站營銷外貿(mào)網(wǎng)站建設(shè)標簽優(yōu)化搜索引擎優(yōu)化

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)