Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Johnny is planning to expand his small bookstore to sell Compact Disks and DVDs. He needs your help. Create a program to manage Johnny?s inventory.

Johnny is planning to expand his small bookstore to sell Compact Disks and DVDs. He needs your help. Create a program to manage Johnny?s inventory.

The program must do the following:

Allow entering new items into the program from the keyboard ? this identifies the items Johnny will sell, Book, CD, or DVD and the proper inventory record created for each one. The SKU, number on hand, description and so-on, are initialized at this time. Some of these items will be updated when receiving an order.

SKU (Stock Keeping Unit) is a unique item number. Do not allow the user to enter this number. They might duplicate it. Create the number inside the program. The best way would be to create a static object Count variable and use that to create a new SKU.

NOTE: some data members will reside in the base class and some in the derived classes. You must provide for appropriate member functions and data. ??

Receiving an order: This means the number of items received is entered into the program along with its cost per item and other pertinent details (see below). If there is a change in the cost, the new selling price is calculated.

Calculate the selling price of each item from its cost based on a markup. The markup for books is 25%, for CDs is 30% and for DVDs is 40%.

Price = Cost + Cost * percentage

Sell an item: On hand is checked, and if there is enough merchandise, the sale is recorded by decrementing the number on hand by the number sold, computing the total price, including sales tax at 9.25%. Use a constant to store the tax percentage. If there is not enough inventory, sell whatever is available and issue a message.

Output a report of all items on hand, including their total dollar value (not total cost). Include a warning whenever there are fewer than 10 of an item currently on hand.

For each item your inventory program must maintain the following:

When new items are created by using feature 1, assign an inventory number for the item.

For Books, maintain the title, author, and short description.

For CDs maintain the title, artist name, number of tracks, playing time, and genre such as: Pop, Jazz, Rock, Country, Rap, etc. Make this open ended so new classifications can be entered. A text field will do.

For DVDs maintain the title, director, lead actor, playing time, and genre such as: Drama, Comedy, etc.(a text field)

For all items, compute the price based on cost and markup, keep count of the number on hand.

The report called for by requirement 5 should output all information about each inventory item.

You will need to take advantage of the capabilities of C++ classes, inheritance, and polymorphism, including virtual functions.

Program Design:

All data members in all classes must be private.

Create a class called Inventory that handles the inventory. The main function calls only a member functions of this class to display a menu. The rest of the inventory management is done in this class. The other classes (below) are never directly referred to in the main function.

Create a class called Item which will serve as a base class for each of the several derived classes for Johnny?s merchandise. The classes Book, DVD and CD will inherit this class.

The inventory class must maintain an array of pointers to Item objects to keep the inventory. Please do not use anything more sophisticated than an array. These pointers can point to Book, CD, and DVD objects.

Keep the program simple. I am not interested in how slick you can make it. I am interested in whether you can demonstrate basic competence in the use of classes, inheritance, virtual functions, and good design.

Make your Item class an abstract base class. All data members in the classes Book, CD, DVD and Inventory must be private. This is to assure that you use the C++ capabilities that this assignment is all about. Do not use any global, protected, or public variables.

NOTE: To submit your project, create several items of each type, book, CD, and DVD. Create an order received for each type item, and several sales recorded to verify the various transactions. Include at least one sale that tries to sell more of something than you have on hand to test that aspect of your program. Also include a report to complete the test. Test, test, test, and test again.image

Inventory Class Illustration & Output Example Output Example: Main Menu: 1) 2) 3) For Sale enter 3 4) For a complete report enter 4 5) To quit enter 5 Inventory Class Book CD Book Array of Item pointers DVD DVD Book New Item: Order: Sale: B) To add a new Book, enter B C) To add a new CD, enter C D) To add a new DVD, enter D M) To return to the main menu enter M B To enter a new item, enter 1 To enter an order, enter 2 Enter title: Enter author: Enter description: Enter cost:. Enter SKU for new order: Enter quantity received: Enter cost:. SKU: Quantity: Next SKU or O to total: SKU: Quantity: Next SKU or O to total: Receipt: 1008 2 1041 3 Total Tax Subtotal Report: $12.50 $21.00 $25.00 (Message if not enough) $63.00 $88.00 $7.70 $95.70 SKU 1001 (Book) Number on hand: Cost: Title: The Art of War Price: Total $ value Author: Sun Tzu Description: A book of strategy by a mysterious philosopher SKU 1002 (CD) So on and so forth 9 $12.45 (Inventory is low, place an order) $15.56 $140.04

Step by Step Solution

3.28 Rating (151 Votes )

There are 3 Steps involved in it

Step: 1

So for solving these questions I am designing a Management System which helpful to johnny for planning and expand his small bookstore 1fist step was based on Use Case Diagram In our system we have thr... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Operations Management Managing Global Supply Chains

Authors: Ray R. Venkataraman, Jeffrey K. Pinto

1st edition

1506302935, 1506302939, 978-1506302935

More Books

Students also viewed these General Management questions