Create a Book class which will include information such as the title, author and
ID: 3553303 • Letter: C
Question
Create a Book class which will include information such as the title, author and the current number of books in the library.
T
his class will have friend functions that allow the books to be seperated alphabetically, either by title or author, ignoring the first word of the title if that word is "the" or "a".
The alphabetical sort by the authors last name should be the last name only and can ignor the first name.
Sorting by the title should ignore spaces such that a letter sequence such as "...for mal..." and "...formal..." would be equivalent.
Class Book should have:
string title; //Holds the complete title of the book
string authorFirst; //Holds authors first name and middle (if exists) name
string authorLast; //Holds authors last name
sring int bookCount; //Holds the current number of book objects in existence
Class Book should also have the following functions:
A default argument constructor supplying default author and title if none supplied by user.
A display function - to display all data members of a Book object.
Accessor functions - to access the title, author name and bookCount data members.
Mutator functions - to sort the books by title or by author's last name, must be able to do either sort as selected by user.
The main() driver function is to create an array of at least 10 pointers of class Book and initialize all data members to either the default values or allow the user to enter title and author information.
The menu portion of main shoudl allow user to select and of the following:
Add a new book using dynamic memory allocation
Book author and title information are to be entered into a character array
This then must be manipulated such that it is stored as a string in the book object.
Edit a selected Book title.
Delete a book.
Allow user to delete a book by either title or author
Must handle book not foud if no match found for title or author
Must also properly realign the pointers so that there is no gap in the array
Display all books.
displayed as last sorted (or not) by the user
Main() should perform array index checking to make sure no operation tries to utilize an object array element that doesn't exist.
Menu entries should be accepted regardless of upper or lowercase entry.
Sorting shouldn't change original book information. Sort using pointer to Book pointers.
All allocated memory must be properly de-allocated when the program ends ir when is deleted.
*****Visual Studios 2010*****
Explanation / Answer
I did this as library management system project . I hope you would get desired help.
http://pastebin.com/CXe0tAue