DOC PREVIEW
GSU CSC 3320 - assign4_02

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CSc 3320 System-Level Programming Fall 2002Homework #4Due: Nov. 13, 2002 (Wednesday) Write a csh script which manages a book library database. The script should allow the user to add books to the database, check in/out a book, display books, print sorted reports and delete books. The script should be menu-based with the following options: Main Menu: (e) Edit Submenu (r) Report Submenu (q) QuitEdit Submenu: (a) Add a book (p) Display a book (i) Checkin book (o) Checkout book (d) Delete a book (q) Return to Main MenuReport Submenu: (a) Sort by Author (t) Sort by Title (c) Sort by Status (q) Return to Main MenuEach book entry should consist of a Title, Author, Status, Borrower's name, and Check Out date. The status of a book could be in or out. Thecheck out date and borrower's name would be empty if the status of a book is in. The book entries must be kept in a text file (called .books) in the user'shome directory with the following format: Oracle Programming:Sunderraman:in::Database Systems:ElMasri:out:12/5/99:JonesJava Programming:King:out:10/12/99:SmithThe title of the book serves as the primary key, i.e. we cannot have two books with the same title. The options within the Report submenu should produce a well formatted listing of the books.Each of the sub-options in the Edit sub-menu should interact with the user as follows: (a) Add a book: should prompt the user for the following: Book Title: Author: This option should check to see if there is a book with the same title; If present, an error message should be generated otherwise the book should be added to the database. (p) Display a book: should prompt the user for the book title: Book Title: After reading the book title, this option should verify if the book is present in the database; If not present an error message should be generated otherwise the book should be displayed in a nice format. (i) Checkin book: should prompt the user for the book title: Book Title: After reading the book title, this option should verify that the book exists and that it is checked out. If so, then the status should be changed in the database, otherwise an error message should be generated. (i) Checkout book: should prompt the user for the book title and borrower's name: Book Title: Borrower: After reading the book title and name, this option should verify that the book exists and that it is checked in. If so, the status should be changed in the database, otherwise an error message should be generated. The system date should be used to update the checkout date. (i) Delete book: should prompt the user for the book title: Book Title: After reading the book title, this option should verify that the book exists and that it is not checked out. If so, then the book entry should be deleted in the database, otherwise an error message should be generated. Each of the sub-options in the Report sub-menu should interact with the user as follows:(a) Sort by Author: should print a well formatted listing sorted by author name of all the books in the database. Try to fit a few entries per screen and allow user to hit enter key to view next page. (t) Sort by Title: same as (a) but sorting is on title. (c) Sort by Status: same as (a) but sorting is on status (in or out); List all out books first then in


View Full Document

GSU CSC 3320 - assign4_02

Download assign4_02
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view assign4_02 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view assign4_02 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?