In Class Example - Book Inventory Records


Specification:

You work in the MIS Department of Barnes and Nelson Book Stores. You have been asked to write a book inventory program. The book information to be stored includes: book name, ISBN, year published, number on hand, cost and price. In addition they need to be able to store from one to four authors' names. The program is to have the following features:

  • Load the inventory from disk (there are at most 500 books in inventory at a time)

  • Enter new books

  • Display the book information given the ISBN

  • Edit book information one item at a time given the ISBN

  • Delete books from the inventory given the current information

  • Save the inventory to disk.

Menu output:

Inventory Modification

  1. Enter New Records

  2. Display by ISBN

  3. Edit Records

  4. Delete Records

  5. Exit

Which?

Sample Data:

image from book

Open table as spreadsheet

Book Data

Example 1

Example 2

Example 3

Example 4

Book Name

The First One

The Second One

The Third One

The Fourth One

ISBN

111-11-11111-1

222-22-22222-2

333-33-33333-3

444-44-44444-4

Year Book was Published

1922

1945

1075

2003

Number OnHand

5

125

244

300

Cost per Book

$12.34

$45.78

$76.45

$124.67

Total Cost of Books

$61.70

$5722.50

$18653.80

$37401.00

Price per Book

$22.65

$76.78

$99.56

$198.56

Total Selling Price

$113.25

$9597.50

$24292.64

$59568.00

Authors 1

Some One

Some Else

Another Person

The Real One

Authors 2

none

none

none

none

Authors 3

none

none

none

none

Authors 4

none

none

none

none

image from book

Design:

  • Class design: bookInventory.gif

  • Structure chart: sc_doInventory.gif

  • Pseudo code: pc_doInventory.txt

Coding:

  • class definition header file: bookInventory.h

  • class methods source file: bookInventory.cpp

  • modules header file: theFunctions.h

  • execution source file: doInventory.cpp

Notice: Take special note of this example. It demonstrates what should be submitted in each of the phases in the homework.




Intermediate Business Programming with C++
Intermediate Business Programming with C++
ISBN: 738453099
EAN: N/A
Year: 2007
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net