What are internal and external subprograms?

BASIC C++ PROGRAM INVOLVING A TRIVIAL DATABASE

  • ok, i do need this program by march 16th at the LATEST, and i will pay extra if it is here by the 14th of the 15th. First and foremsot, the end result of this program is completely irrelecant because the only thing that needs to be done is the following: you show good understanding and use all of the following things arrays or records or objects selection constructs (branching) iteration constructs (looping) subprograms (both built-in and user-defined) parameter passing sorting techniques or searching techniques files With that said, the program is basically a database where a user can enter items into the database, delete items from it, edit the values and quantities of the item and have a trivial generated order form. And the items in the database need to be sorted in the simpiliest of manner. I have provided a flow chart. good luck. link below for flowchart, just follow this and you'll be set. And a password function to use the program would be kewl, but not nesacary www.wcryder.addr.com/flowchart4dossier.doc ps i cant stress how much time is of the essence at this point, the sooner the better. Thats is why i am offering this at such a high price, i need BASIC coding on an amateur level, the higher price is to compensate for the lil time, not becuase i want detail. I only ask for a simple program meeting the above requirements and has inline docuentation

  • Answer:

    Hi cpuprogger-ga: (BTW, Since I get this done by the *13th*, do I deserve a *bigger* bonus? How about doubling the price? Just kidding :) Please use "tipping" method for the bonus. Thanks!). Here are the source files-- http://www.csua.berkeley.edu/~pchen/database.zip 1) unzip 2) make (or gmake) The executable created is: database database.txt is the database file (text). To understand this, just look at main.c databaselib.c The rest are just supporting files/libraries to enable cleaner abstraction (also demonstrate mastery of encapsulation). All files are well commented and should be self-explanable. File IO mastery is demonstrated by doing it two ways: the convention string way (in ReadFile) and the stream way (in WriteFile). Here's a script of the run: > database Welcome to the Studboy's Database Demo! Please enter username and password. Username: studboy Password: what??? Your password is INVALID!!! The right password is GoogleAnswers > database Welcome to the Studboy's Database Demo! Please enter username and password. Username: studboy Password: GoogleAnswers Your password is valid! Welcome! This program lets you manage items. You may add and remove items as well as place orders. Reading in database... done reading! Welcome studboy. Please select from menu: 1. Add item. 2. Remove item. 3. View/edit items. 4. Place order. 5. Quit. Enter your selection: Please enter an integer : 1 MENU: 1. Add new item. 2. Main menu. Enter your selection: 1 Enter the name of the item to add: Sex Enter an initial inventory count: 3 MENU: 1. Add new item. 2. Main menu. Enter your selection: 1 Enter the name of the item to add: Booz Enter an initial inventory count: 5 MENU: 1. Add new item. 2. Main menu. Enter your selection: 2 Welcome studboy. Please select from menu: 1. Add item. 2. Remove item. 3. View/edit items. 4. Place order. 5. Quit. Enter your selection: 3 MENU: 1. View items. 2. Edit items. 3. Main menu. Enter your selection: 1 Items in database ------------------- 1) BOOZ 5 2) SEX 3 MENU: 1. View items. 2. Edit items. 3. Main menu. Enter your selection: 2 Items in database ------------------- 1) BOOZ 5 2) SEX 3 Enter the item number of the item you want to edit: 2 Enter new inventory count: 8 MENU: 1. View items. 2. Edit items. 3. Main menu. Enter your selection: 1 Items in database ------------------- 1) BOOZ 5 2) SEX 8 MENU: 1. View items. 2. Edit items. 3. Main menu. Enter your selection: 3 Welcome studboy. Please select from menu: 1. Add item. 2. Remove item. 3. View/edit items. 4. Place order. 5. Quit. Enter your selection: 4 MENU: 1. Order item. 2. Main menu. Enter your selection: 1 Items in database ------------------- 1) BOOZ 5 2) SEX 8 Enter the item number of the item you want to order: 1 Enter how many: 4 Your order for 4 BOOZ has been sent to the appropriate dept! MENU: 1. Order item. 2. Main menu. Enter your selection: 2 Welcome studboy. Please select from menu: 1. Add item. 2. Remove item. 3. View/edit items. 4. Place order. 5. Quit. Enter your selection: 5 > > cat database.txt BOOZ 5 SEX 8 > database Welcome to the Studboy's Database Demo! Please enter username and password. Username: studboy Password: GoogleAnswers Your password is valid! Welcome! This program lets you manage items. You may add and remove items as well as place orders. Reading in database... done reading! Welcome studboy. Please select from menu: 1. Add item. 2. Remove item. 3. View/edit items. 4. Place order. 5. Quit. Enter your selection: Please enter an integer : 3 MENU: 1. View items. 2. Edit items. 3. Main menu. Enter your selection: 1 Items in database ------------------- 1) BOOZ 5 2) SEX 8 MENU: 1. View items. 2. Edit items. 3. Main menu. Enter your selection: 3 Welcome studboy. Please select from menu: 1. Add item. 2. Remove item. 3. View/edit items. 4. Place order. 5. Quit. Enter your selection: 2 MENU: 1. Remove item. 2. Main menu. Enter your selection: 1 Items in database ------------------- 1) BOOZ 5 2) SEX 8 Enter the item number of the item to remove: 2 SEX removed from the database. MENU: 1. Remove item. 2. Main menu. Enter your selection: 2 Welcome studboy. Please select from menu: 1. Add item. 2. Remove item. 3. View/edit items. 4. Place order. 5. Quit. Enter your selection: 3 MENU: 1. View items. 2. Edit items. 3. Main menu. Enter your selection: 1 Items in database ------------------- 1) BOOZ 5 MENU: 1. View items. 2. Edit items. 3. Main menu. Enter your selection: 3 Welcome studboy. Please select from menu: 1. Add item. 2. Remove item. 3. View/edit items. 4. Place order. 5. Quit. Enter your selection: 5 > cat database.txt BOOZ 5 >

cpuprogger-ga at Google Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.