Homework 8 Csc309.
Due Thursday May 25, 2006 by 11:59pm.
Problem 1
50 points.
This one is open ended its up to you to come up with a design. Good examples to look at would be bookstore.cpp and engspanUI.cpp.
Write an application to allow the user to add, delete and perform searches on various wines. The program will initialize its data using the file wine.txt
A suggestion would be to create a class to represent a wine object. Load the wine objects into a vector. I would avoid the using a map.
You should break this up into a couple of different classes.
Requirements
- Load the data into a list, I would use a vector.
- The program should allow the user to enter commands.
- The user can add a wine to the list.
- Delete a wine from the list.
- Do at least a couple of searches.. ex/ by name and country. Two different wines can have the same name. So output all wines with that name. Add another search you pick the conditions.
- The file should reflect changes to the list. Make a decision about this. Do you want to save after each add and delete or give the user the option to save ?
- Overload at least a few operators. For example two wines can be considered equal (==) if they have the same name, variety, color and country. Use those conditions or pick your own. Overload a few more operators that make sense for the program.
- Add a few more options to the menu, you decide.
The file wine.txt has been simplified so you can use the stream operator to read the file. Here is an example on how to read the file. readwine.cpp
Do not e-mail me asking me if you have done enough, if you are asking you probably did not.
Upload to COL
If you break this up into multiple files then zip it up and upload the zip file.