You are on page 1of 1

PFC - Workshop 6

Books in Stock
Design and code a program that lists the books in stock for a local bookstore in ISBN order. Your
program prompts for and accepts

• an ISBN,
• a price and
• a quantity in stock

for each title.

Design your program according to structured design principles. Your program uses parallel arrays or
array of structs and includes functions to validate the input and to sort the items by ISBN. You may
assume that there are no more than 100 titles to process, but write your code so that you can change this
limit by editing a single statement.

Preface each function header with a comprehensive description of the function purpose, the function
parameters and the function return value.

The output from your program looks something like:

Books in Stock Organizer


========================
ISBN : 0619215216
Price : 49.95
Quantity : 5
ISBN : 0201533936
Price : 89.95
Quantity : 10
ISBN : 0534379648
Price : 69.95
Quantity : 15
ISBN : 0

Books in Stock
==============
ISBN Price Quantity Value
--------------------------------------
0201533936 89.95 10 899.50
0534379648 69.95 15 1049.25
0619215216 49.95 5 249.75
-------
Total value books in stock 2198.50

You can run the BOOKS.EXE file to see how the program looks like.

You might also like