Question: Library management system c++ Need help implementing the system architecture into code. Thank you! Note: there are four data files (reader,librarian,book,copy) and they are flexible

Library management system c++

Need help implementing the system architecture into code. Thank you!

Note: there are four data files (reader,librarian,book,copy) and they are flexible meaning you can create the data file however you like.

2.2 Class: User

User is a base class used to represent all the users of the system. Either a reader or a librarian can be called as user. So, User class should have those common member variables and functions of all kinds of users. Specifically, users username and password, as well as their accessors and mutators, should be included.

2.2.1 Class: Reader

Reader is a derived class of User class. Each object of this class represents a reader of the system. In reality, a reader can perform operations such as borrowing a book, returning a book and reserving a book, so Reader class should keep information such as: Readers Username; Readers Password; Maximum number of copies that a reader is allowed to keep at the same time, itll be reduced because of penalties; List of copies borrowed by the reader; List of books reserved by the reader; Number of penalty, overdue copies will lead to penalty; Apart from accessors and mutators, some other member functions are needed to execute these operations. These will be introduced in the next chapter. Also, Reader class can be divided into two types: Student and Teacher.

2.2.1.1 Class: Teacher

Teacher class should have all members defined in Reader class, also A teacher can keep more copies simultaneously, e.g. 10. A teacher can keep a copy for a longer period, e.g. 50.

2.2.1.2 Class: Student

Student class should also have all members defined in Reader class, and A student can keep less copies simultaneously, e.g. 5. A student can keep a copy for a shorter period, e.g. 30;

2.2.2 Class: Librarian

Librarian is the other derived class of User class. Each object of this class represents a librarian of the library. The information needed to be kept in this class is the same as in User class. However, a librarian can perform more operations such as adding and deleting books or users. These will be talked about in detail in the next chapter.

2.3 Class: Book

Book class is used to represent a set of the same copies of a specific book. A book has its own unique ISBN, and although therere many copies having the same ISBN, you should only create one object of Book class. Each object of this class should have the following information: ISBN, a sequence of digits to uniquely identify a book; Books title; Books author. For simplicity, each book has only one author; Books category, such as math, chemistry, engineering; List of reservers, indicating who reserves the book and if any copy of the book is available, the reserver can borrow it. You can implement it using a queue;

2.4 Class: Copy

Copy class is a derived class of Book class. Since there may be several copies of the same book, each copy can be represented by an object of this class. Therefore, Copy class should include all the member variables of Book class. Besides, the following information should be kept: ID. This is the unique identification for each copy; Readers name, indicating who borrows this copy; borrow date, indicating when the reader starts to keep the copy; reservation date, indicating when the reader starts to make the reservation; expiration date, indicating the expected date for the reader to return the copy;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!