Assignment 3: “CatalogBrowser”

Tuesday, September 24, 2002
Due: Tuesday, October 8, 12:00PM


Previous page | Next page


Description

Implement an on-line library catalog that lets you search for a book by substrings of author or title and lets you "browse," i.e., see what books are nearby on the shelf. Implement this with a doubly-linked list.

Data

Here is a text file chinook.txt containing sample data as used by CU's online "Chinook" catalog system. Make sure your program works on data files of that exact format. Each line has author, title, and call number; you need to look at the file to see how the fields are delimited. The file is in the CSEL at ~karl/public_html/2270.fall02/CatalogBrowser/chinook.txt.

Details

You need to support the following menu. Copy it and make it part of your main program.
cerr << "   case 'n': start new search                        " << endl;
cerr << "   case 's': search for string in author or title    " << endl;
cerr << "   case 'f': read a catalog from a file              " << endl;
cerr << "   case 'u': undo last change to results             " << endl;
cerr << "   case 'r': show results                            " << endl;
cerr << "   case 'c': show catalog                            " << endl;
cerr << "   case 'b': 'browse', e.g., if the user types       " << endl;
cerr << "                         b 7                         " << endl;
cerr << "             then a list gets displayed of the       " << endl;
cerr << "             7th book in the current list of         " << endl;
cerr << "             search results plus the five books      " << endl;
cerr << "             that sit on either side of it on        " << endl;
cerr << "             the library shelf                       " << endl;
cerr << "   case 'q': quit                                    " << endl;

A good half-way point

Be able to read the data into a doubly-linked list. For starters, just insert at the front of the list; later you can modify that code to insert entries in the order of their call numbers.

Files to turn in

You need to write and turn in these seven files: CatalogEntry{.h,.cxx}, CatalogNode{.h,.cxx}, Catalog{.h,.cxx}, and CatalogBrowser.cxx. Use the Makefile that is in the CSEL at ~karl/public_html/2270.fall02/CatalogBrowser/Makefile.


Previous page | Next page | Back to top

3:40 PM, Thursday, December 12, 2002