JAVA版的图书管理系统

JAVA版的图书管理系统

送你一份代码,结构大致按照你的需求了,自己增加一些小功能,不会的话请教你同学。分给我,钱就不用了。#include #define FORMAT "\n%-8d%-8d%-7d%-8d%-7d%-8d%-10s%-9s%-9s\n"#include #include #include #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;igo[j].price)k=j; t=go[i];go[i]=go[k];go[k]=t; } print(); for(i=0;i