Home | |
Schedule | |
Assignments | |
Lectures | |
Resources
Project Five Check Nile.comDue Date: Friday, April 25, at 10:00 a.m.
Before you start:
Introduction. The purpose of this check is twofold: 1) To make sure you complete a portion of your project early, so you do not end up having to complete the entire project in the final days before it is due. 2) To give you practice in implementing your program one part at a time. Description The best way to implement complex programs is to implement them one piece at a time and make sure each part compiles and runs correctly before moving on to the next step. In your implementation of project 5, it is essential that your program correctly read in the inventory from the data file and be able to print it out. If these steps do not work correctly, the other functions will not be able to function correctly either. Therefore, for this check, you will implement only the functions in proj5.cc and two of the functions in orders.cc-- ReadInventory( ) and printInventory( ). You will not implement the functions in customerRec.cc. In addition, you will use function stubs for the three other functions in orders.cc. Function stubs are functions that have the correct function header, but the body of the function is empty. They are used as place holders for program testing in the early stages so that the program will compile and they can be called but they do nothing. You can see some function stubs in the customerRec.cc file that you copied from the csci131 PROJ5 directory.
Completing the project check
g++ -g -Wall proj5.cc orders.cc customerRec.cc -o proj5
You can then run it by typing, ./proj5 at the Linux prompt on your terminal.
The following is an example of a sample run of the proj5 program once you have completed the requirements of the project 5 check: Inventory has been read. There are currently 6 items for sale. Please choose one of the following options: (L) Print a list of the items for sale. (P) Process a customers purchase requests. (I) Create a file with the current inventory status. (B) Create a file with customers waiting for backorders. (Q) Quit. Enter menu choice: L L PRODUCT TITLE CATEGORY PRICE NUMBER IN STOCK The bold and the ugly Book 26.94 27 The fully dressed ladies CD 12.37 34 My Lunch with Andre Video 19.99 1 The March Hares Book 15.33 5 Brahms Lullaby CD 16.66 3 Trivial Millionaires Game 9.85 12 Please choose one of the following options: (L) Print a list of the items for sale. (P) Process a customers purchase requests. (I) Create a file with the current inventory status. (B) Create a file with customers waiting for backorders. (Q) Quit. Enter menu choice: p p Please choose one of the following options: (L) Print a list of the items for sale. (P) Process a customers purchase requests. (I) Create a file with the current inventory status. (B) Create a file with customers waiting for backorders. (Q) Quit. Enter menu choice: v v Invalid Entry. Please re-enter menu choice. Please choose one of the following options: (L) Print a list of the items for sale. (P) Process a customers purchase requests. (I) Create a file with the current inventory status. (B) Create a file with customers waiting for backorders. (Q) Quit. Enter menu choice: i i Please choose one of the following options: (L) Print a list of the items for sale. (P) Process a customers purchase requests. (I) Create a file with the current inventory status. (B) Create a file with customers waiting for backorders. (Q) Quit. Enter menu choice: B B Please choose one of the following options: (L) Print a list of the items for sale. (P) Process a customers purchase requests. (I) Create a file with the current inventory status. (B) Create a file with customers waiting for backorders. (Q) Quit. Enter menu choice: q q Thank you for shopping Nile.com!
To submit your finished project check:
2. Hand in a hard copy of the files you submitted electronically. Hand this to your instructor in class on the project check's due date. 3. Print out the grading header, put your name at the top of it, and hand it in with your hard copy. Get started early and have fun! Honor code: Please review the collaboration policy on the main course webpage. Also refer to the math and CS department honor code policy. Home | | Schedule | | Assignments | | Lectures | | Resources
|