--------------- {{{~cpp class book { private : // 책 상태 정보 public : book *next; book *first; int situation,selection; book(); ~book(); char book_name[30]; char book_writer[15]; char book_ISBN[10]; void input(); void search(); void borrow(); void restoration(); }; }}} ----------------- {{{~cpp #include #include "useclass.h" using namespace std; void main() { int number = 0; book b; while(number != 5) { cout << "1.책 입력 2.검색 3.대여 4.반납 5.종료 : "; cin >> number; if(number == 5) break; switch(number) { case 1 : b.input(); break; case 2: b.search(); break; case 3: b.borrow(); break; case 4: b.restoration(); break; default : cout<<"잘못 입력하셨습니다."<---------- {{{~cpp #include #include #include "useclass.h" using namespace std; book :: book(){ situation=0; } book :: ~book(){ } void book :: input() { book * k = new book; cout << "책 제목 : "; cin >> k->book_name; cout << "책 저자 : "; cin >> k->book_writer; cout << "책 ISBN : "; cin >> k->book_ISBN; k->next=first; first=k; } void book :: search(){ char name[30]; char ISBN[10]; cout<<"책 이름과 ISBN 중 선택하시오. 1.책 이름 2.ISBN : "; cin >> selection; if (selection == 1){ cout<<"찾을 책 이름은?"<>name; book *find; find = first; while(find->next !=NULL ){ if(strcmp(find->book_name,name)==0) { cout<<"책 제목 : "<book_name<book_writer<book_ISBN<situation==0){ cout<<"상태 : 반납됨"<next == NULL){ cout<<"찾을 수 없습니다."<next; } } } } else if (selection==2){ cout<<"찾을 책 ISBN은?"<>ISBN; book *find; find = first; while(find->next !=NULL ){ if(strcmp(find->book_ISBN,ISBN)==0){ cout<<"책 제목 : "<book_name<book_writer<book_ISBN<situation==0){ cout<<"상태 : 반납됨"<next == NULL){ cout<<"찾을 수 없습니다."<next; } } } } else{ cout<<"잘못 입력하셨습니다."<>selection; if (selection == 1){ cout<<"빌릴 책 제목 : "; cin >> name_temp; book *lent; lent = first; while(lent->next !=NULL ){ if(strcmp(lent->book_name,name_temp)==0){ lent->situation = 1; break; } else{ lent=lent->next; } } } else if (selection==2){ cout<<"빌릴 책 ISBN : "; cin >> ISBN_temp; book *lent; lent = first; while(lent->next !=NULL ){ if(strcmp(lent->book_ISBN,ISBN_temp)==0){ lent->situation = 1; break; } else{ lent=lent->next; } } } else{ cout<<"잘못 입력하셨습니다."<> selection; if ( selection == 1){ cout << "반납 된 책 이름 : "; cin >> restoration_name; book *restore; restore = first; while(restore->next !=NULL ){ if(strcmp(restore->book_name,restoration_name)==0) { restore->situation = 0; break; } else{ restore=restore->next; } } } else if (selection ==2){ cout << "반납 된 책 ISBN : "; cin >> restoration_ISBN; book *restore; restore = first; while(restore->next !=NULL ){ if(strcmp(restore->book_ISBN,restoration_ISBN)==0) { restore->situation = 0; break; } else{ restore=restore->next; } } } else{ cout<<"잘못 입력하셨습니다."<