검색어 입력폼

LibrarySystem

저작시기 2009.05 |등록일 2010.04.05 파일확장자C언어 (cpp) | 가격 2,500원

소개글

To implement a small library system
기능 : 메뉴 선택에 따른_입고, 대여, 반납, 저자-회원 목록 출력

This project is to write a program that can be used in a small library to include new books in the library, to check out books to people, and to return them.
(1) This small library maintains two data structures, one for authors and titles, and one for people who checked out books.
The program uses an array 'catalog' of all the authors of the books and an array 'people' of all the people who have used the library at least once.
Author *catalog[26];
Person *people[26];
(2) This small library system must be able to handle three major tasks, checking-out books, returning books, and including new books.

(3) We can use an array of pointers to the author structures and indexed with letters; Each slot of the array points to the linked list of authors whose name starts with the same letter.
(4) The list can be ordered alphabetically.


ex) 책 노드 클래스
class Book {
private:
저서 이름 선언
Person 노드를 가리키는 포인터 선언
다음 책노드를 가리키는 포인터 선언
Book 생성자
필요한 friend class가 있으면 선언
};

#include
#include
#include

using namespace std;

class Person;

class Book {
private:
char title[30];
Person *person;
Book *next;
Book(char name[], char title[]){strcpy(this->title, title); person = 0; next = 0;};
friend class Library;
};

class Author {
private:
char name[30];
Book *book;
Author *next;
Author(char val[]) {strcpy(this->name, val); book = 0; next = 0;}
friend class Library;
};
....


*output ----

List of People ===========================================================
1 : Brown
Fitzgerald Euphranor
Murdoch The Red and Green
2 : Chapman
Fielding Pasquin
3 : Kowalski
has no books

================================== MENU ==================================
1. insert New book
2. check out book
3. restore
4. display Author's List
5. display People's List
6. exit
==========================================================================

Enter your choice: 1

Insert New Book ==========================================================
Enter the author's name : Miller
Enter the title : User Modelling

================================== MENU ==================================
1. insert New book
2. check out book
3. restore
4. display Author's List
5. display People's List
6. exit
==========================================================================

Enter your choice: 4


List of Author ===========================================================
1 : Fielding
Pasquin checked out to Chapman
The History of Tom Jones on the shelf
2 : Fitzgerald
Selected Works on the shelf
Euphranor checked out to Brown
3 : Murdoch
The Red and Green checked out to Brown
Sartre on the shelf
The Bell on the shelf
4 : Miller
User Modelling on the shelf


.....

컴파일 실행환경

Microsoft visual c++ 6.0
다운로드 맨위로