Em Andamento

inventory

Write an inventory program for a small camera and video store. You must read in the current inventory records from a file, and store the inventory information given in an array of structs. You may assume that it has anywhere from 1 up to 100 items in stock at this time. The first part of the data file, the inventory section, will contain a series of lines, one line per product, with the following information on each: (1) item number (a $-digit integer), (2) number currently in stock (an integer in the range 0 thru 99), (3) unit price (real), (4) item name (a string of up to 50 characters). This data is not sorted. Print this initial inventory information in a table. After you read in the echoprint the inventory, sort the data structure in ascending order by item number. Then print another table, showing the current inventory in the same format as before, but in sorted form.

Next you are ready for the inventory updating portion of the program. The second part of the data file, the update section, contains records of recent orders processed which must be used to update the inventory records. Each line in this part of the data file contains one transaction, giving (1) the order number (3 letters followed by 4 digits), (2) item number (same as above), (3) transaction code (‘S’=sold, ‘R’=returned), and (4) number of items sold or returned (an integer). The item number should correspond to an item number read in from the inventory ??" if so, the transaction is recorded by updating the data structure storing the inventory data. If the transaction code is ‘R’, the number of items returned is added to the number in stock. If the code is ‘S’, the number sold is subtracted from the number in stock. If more items are sold than are in stock, print a message to the effect, and printa message giving the number which must be back-ordered (the difference between the number ordered and the number in stock). Then set the number currently in stock to zero. Note that for each item in the inventory, there may be zero, one, or multiple transactions.

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.

3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).

Do not hard-code the file name into your program. The file name is to be read in as interactive imput. If the file does not open, ask the user to re-enter the file name. Keep asking them to re-enter a file name until the file opens correctly. You may copy this code. You may assume that a file name is no longer than 25 characters and contains no blanks.

A valid data file contains:

First part of data file (inventory): each line contains (one line per item)

*Starting in column 1 : item number*

*6 : number in stock*

*9 : unit price*

*17: item name*

Second part of data file (updates): each line contains (unknown number of lines)

*Starting in column 1 : order number*

*9 : item number*

*14: transaction code*

*16: number sold or returned*

**Error Checking**

You may assume that every data line in the inventory section of the file is accurate and does not need to be checked. However, certain errors may occur in the update section. The transaction cannot be processed, and error messages must be printed in (1) the item number specified in a transaction line was not in the original inventory data, and/or (2) the transaction code is not ‘S’ or ‘R’ (note only capitals are valid), and/or (3) the number of items sold or returned is negative. Print an error message which tells exactly what happened. For example, if both the transaction code is invalid and the number of items is negative, you would print 2 error messages, one stating that the transaction code was invalid, and one stating that the number of items given was invalid (less than zero).

**Output**

Required output includes:

1. table of echoprinted inventory data, in the order read in

2. table of echoprinted inventory data, sorted

3. as each transaction line is processed, echoprint the data from the transaction line, then print a message describing what action was taken, and any error messages if needed; this output section would best be displayed in tabular form also

4. table of inventory, after all update transactions are processed

Note that printed tables of inventory data must show all 4 data values for all items at the store.

**Use of Required Data Structures and Algorithms**

You must use an array of structs to store and process the inventory data. Each inventory item must have it’s data represented in one struct in the array.

You must use either the linear or the binary search to locate inventory entries.

You must use the selection sort as discussed in lecture to perform the sorting operation.

## Platform

borland c++,

Habilidades: Programação C, Engenharia, MySQL, PHP, Arquitetura de software, Teste de Software

Ver mais: write a program for binary search, what is sorting data, what is r programming, what is linear search and binary search, what is linear programming, what is data structures in c, what is data structures and algorithms, what is data structures, what is data structure in programming, what is data structure in c, what is data sorting, what is binary search with example, what is binary search in data structure, what is binary search in c, what is binary search, what is a string in programming, what is an array in programming, what is an algorithms, what is algorithms in programming, what is a data structures, what is a data structure in c, what is a binary search, what does binary, what data structure, what are data structures in c

Acerca do Empregador:
( 1 comentário ) United States

ID do Projeto: #3025190

Premiar a:

bogdanstan

See private message.

$15 USD em 2 dias
(194 Avaliações)
5.7

14 freelancers estão ofertando em média $31 para este trabalho

lmxvw

See private message.

$20.4 USD in 2 dias
(124 Comentários)
4.6
dcrs

See private message.

$30.6 USD in 2 dias
(11 Comentários)
4.6
codeCrafter10

See private message.

$16.15 USD in 2 dias
(17 Comentários)
4.3
johngull

See private message.

$8.5 USD in 2 dias
(11 Comentários)
4.2
exceptionalcoder

See private message.

$63.75 USD in 2 dias
(9 Comentários)
4.1
saadrahmanvw

See private message.

$72.25 USD in 2 dias
(22 Comentários)
4.3
shashikhanvw

See private message.

$85 USD in 2 dias
(15 Comentários)
3.8
gworroll

See private message.

$17 USD in 2 dias
(42 Comentários)
3.7
borninleningrad

See private message.

$12.75 USD in 2 dias
(5 Comentários)
2.9
costelus

See private message.

$12.75 USD in 2 dias
(19 Comentários)
2.7
adrianhara

See private message.

$12.75 USD in 2 dias
(7 Comentários)
1.9
vw965016vw

See private message.

$51 USD in 2 dias
(2 Comentários)
0.2
coderx2k

See private message.

$17 USD in 2 dias
(0 Comentários)
0.0