Click here to Skip to main content
12,511,665 members (49,256 online)

thienle - Professional Profile


    Blog RSS
write a program that maintains a list of books for a library. The program must accept commands to make insertions and deletions in this list, while simultaneously maintaining the list in alphabetical order for three keys: Subject, Author, and Title.
1. The book information created in previous executions of this program, if any, is stored in text file "books.txt". Each book's information is on three consecutive lines. The format of each line is described in the table below:

Line Information
1 Book Title
2 Author (last name, first name)
3 Subject

2. The program inputs commands from the user (keyboard) to insert, delete, list by key, and quit. You are free to implement the "user interface" part of the program as you wish, as long as it is easy to use.
1. The results of each operation should be written to the screen. In addition, transaction information describing the processing of each command should be written to an output file. (For instance, for an Insert command, the output file should contain the title, author, and subject information, as well as the location where the record was inserted and the location of its entry in each ordering array.) The information in the output file should be neatly formatted and clearly labeled.
2. The "books.txt" text file should be rewritten to contain the updated book information.
Data Structures
The records containing information about each book (subject, author, and title strings) must be stored in an unsorted list. These records may be stored in consecutive array slots in the order in which they are inserted. For example, if the book information is stored in an list called bookData,[0] contains information about the first book inserted,[1] contains information about the second book inserted and so on.

The list must be maintained in order by title, in order by author, and in order by subject by using arrays of pointers (indexes), one for each key. For instance, sup


For more information on Reputation please see the FAQ.


Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege, and the given member types also gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilverAdmin
Store personal files in your account areaplatinumplatinumSitebuilder, Subeditor, Supporter, Editor, Staff
Have live hyperlinks in your biographybronzebronzebronzebronzebronzebronzesilverSubeditor, Protector, Editor, Staff, Admin
Edit a Question in Q&AsilversilversilversilverYesSubeditor, Protector, Editor, Admin
Edit an Answer in Q&AsilversilversilversilverYesSubeditor, Protector, Editor, Admin
Delete a Question in Q&AYesSubeditor, Protector, Editor, Admin
Delete an Answer in Q&AYesSubeditor, Protector, Editor, Admin
Report an ArticlesilversilversilversilverSubeditor, Mentor, Protector, Editor, Staff, Admin
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubeditor, Mentor, Protector, Editor, Staff, Admin
Edit other members' articlesSubeditor, Protector, Editor, Admin
Create an article without requiring moderationplatinumSubeditor, Mentor, Protector, Editor, Staff, Admin
Approve/Disapprove a pending QuestionProtector, Admin
Approve/Disapprove a pending AnswerProtector, Admin
Report a forum messagesilversilverbronzeProtector, Editor, Admin
Approve/Disapprove a pending Forum MessageProtector, Admin
Create a new tagsilversilversilversilverAdmin
Modify a tagsilversilversilversilverAdmin

Actions with a green tick can be performed by this member.

-- There are no messages in this forum --

Advertise | Privacy | Mobile
Web02 | 2.8.160929.1 | Last Updated 1 Oct 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid