COSC 072: Computer Science II

Project 5
Spring 2005

Due: May 2 @ 5 PM
10 points

You're getting tired of your 9-to-9+ coding job at one of the local sweatshops. Being in DC, you decide to tap into some of the drug money floating around. You do some searches and discover that the Department of Homeland Security Advanced Research Projects Agency (DHSARPA) along with the Drug Enforcement Agency (DEA) are soliciting proposals for a ``virtual case file'' so agents can connect the dots. You know it's probably wired, but you decide to submit a proposal anyway.

You figure that the virtual case file will have to have a searchable source of drug information. Other than one youthful indiscretion when you didn't inhale, you know nothing about drugs. You go to the Internet and find an excerpt from Britannica: drugs.pdf. (Note that you cannot use any other source than this document for this project.)

DHSARPA and DEA will hold a bidder's conference on May 2 at 5 PM, and you plan to attend, mostly to meet the program managers, to see who your competition might be, and to get some insights into the latest in software-developer fashion. But for this conference, they're doing something different: To separate the wheat from the chaff, they're requiring that potential bidders demonstrate a prototype of the system they plan to propose. Then, based on the demonstration, the program managers will invite pre-proposals as a prelude to full proposals.

Using only the excerpted material from Britannica (drugs.pdf), build a software prototype for storing and retrieving information about drugs. The only information your prototype needs to store is the type and name of the drugs mentioned in the article. (It's fine if you miss one or two.) The only functions your software needs to perform are (1) adding information for new drugs, (2) searching for drugs by name, (3) saving drug information to a file, and (4) loading drug information from the same file. Notice that many drugs have several names. For example, diacetylmorphine is known more commonly as heroin. If I were to search for ``heroin'', your system should indicate that it is an opiate also called diacetylmorphine. If I were to search for ``diacetylmorphine'', then it should indicate that it is an opiate also called heroin. It's fine if you incorporate more information, but keep in mind that the same set of information is not necessarily available for all drugs discussed in the article.

You could implement all of these functions by using just a vector of strings. However, what I'm looking for is a solid object-oriented design. I am not looking for a comprehensive system, meaning that your system need not represent and store every piece of information about every drug. A real system would need to store that heroin was derived from morphine and that the Bayer Company synthesized it in Germany in 1898. However, you do not need to worry about such information. What is important for this project is an object-oriented design that would serve as the basis for a comprehensive system. Put another way, I would rather have a well-designed system storing little information than a poorly-designed system storing everything. After all, all of the information is already stored in the document itself, but no one would use the unmodified document as the basis of an information system.

Don't worry about commenting your code. Spend your time on the design and implementation. You will obviously have to make decisions about your design that will affect the running time of insertions and retrievals. You should be able to discuss and justify your design decisions.

You'll obviously need a container, and you can use any of the containers in the Standard Template Library. However, I would encourage you to use one that you implemented: Stack, Queue, List, Vector, or BSTree. If you use one of the containers you implemented, you must keep the container's original design, meaning that you cannot make application-specific modifications to the container. That is, you cannot make the container's implementation specific to storing information about drugs. You can, however, if necessary, derive an application-specific container.

Instructions for Electronic Submission: Just like P4.