Mary is planning to open her own store to sell appliances, electronics, and furniture. You will design various classes and write a program to manage the inventory. The program must do the following: 1. Allow entering new items into the program from the keyboard – this identifies the items Mary will sell, appliances, digital media, and furniture, and the proper inventory record created for each one. The SKU (automatic number is the best option), number on hand, description and so-on, are initialized at this time. Some of these items will be updated when receiving an order. NOTE: some data members will reside in the base class and some in the derived classes (see below), and you must provide for appropriate member functions and data. 2. Receiving an order -- this means that the number of items received is entered into the program along with it’s cost per item and other pertinent details (see below). If there is a change in the cost, the new selling price is calculated. 3. Calculate the selling price of each item from its cost based on a markup. The markup for appliances is 10%, for digital media is 15% and for furniture is 20%. Price = Cost + Cost * percentage 4. Sell an item. This means that the on hand is checked, and if there is enough merchandise, the sale is recorded by decrementing the number on hand by the numb

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 1CP
icon
Related questions
Question
Mary is planning to open her own store to sell appliances, electronics, and furniture.

You will design various classes and write a program to manage the inventory.
The program must do the following:
1. Allow entering new items into the program from the keyboard – this identifies the items Mary will sell, appliances, digital media, and furniture, and the proper inventory record created for each one. The SKU (automatic number is the best option), number on hand, description and so-on, are initialized at this time. Some of these items will be updated when receiving an order. NOTE: some data members will reside in the base class and some in the derived classes (see below), and you must provide for appropriate member functions and data.
2. Receiving an order -- this means that the number of items received is entered into the program along with it’s cost per item and other pertinent details (see below). If there is a change in the cost, the new selling price is calculated.
3. Calculate the selling price of each item from its cost based on a markup. The markup for appliances is 10%, for digital media is 15% and for furniture is 20%. Price = Cost + Cost * percentage
4. Sell an item. This means that the 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.5%. Use a constant to store the tax percentage. If there is not enough inventory, sell whatever is available and issue a message.
5. 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:
1. When new items are created by using feature 1, assign an inventory number for the item.
2. For appliances, maintain the manufacturer, color and short description.
3. For digital media maintain the title, artist/actor, playing time, and genre. Make this open ended so new classifications can be entered. A text field will do.
4. For furniture maintain the dimensions (Height Length Width), color, and category such as: Living room, Bedroom, etc.(a text field)
5. For all items, compute 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 overriding.
Program Design:
1. Create a class called Inventory that does the inventory. All data members have to be private. Your main function and any function that it calls should use the member functions of this class for all transactions. The other classes (below) are not directly referred to in the main function.
2. Create a class called Item which will serve as a base class for each of the several derived classes for Mary’s merchandise. The classes Appliance, DigitalMedia, and Furniture will inherit this class.
3. The inventory class must maintain three arrays of Appliance, DigitalMedia, and Furniture objects to keep the inventory. Please do not use anything more sophisticated than an array.
4. Keep the program simple. I am interested in whether you can demonstrate basic competence in the use of classes, inheritance, and good design.
5. All data members in the classes Appliance, DigitalMedia, Furniture, 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 variables.
6. When the user decides to quit the updated inventory information is saved back to the secondary storage to a file (i.e. inventory.txt) to give the user the option to either start fresh or continue where he/she left off at the beginning of the next execution.
 
Output Example:
Main Menu:
1) To enter a new item enter 1
2) To enter an order enter 2
3) For Sale enter 3
4) For a complete report enter 4
5) To quit enter 5
New Item:
A) To add a new appliance enter A
D) To add a new digital media enter D
F) To add a new furniture enter F
R) To return to the main menu enter R
R
Enter manufacturer:………………………
Enter color: ……………………
Enter description: ……………….
Enter cost: ………………………
Order:
Enter SKU for new order: ………
Enter quantity received: ………..
Enter cost: ………………………

Sale:
SKU: …………………………….
Quantity: …………………………
Next SKU or O to total: …………
SKU: …………………………….
Quantity: ………………………...
Next SKU or O to total: …………
Receipt:
1008 2 $12.50 $25.00 (message if not enough)
1041 3 $25.00 $75.00
Total before Tax $100.00
Tax $9.50
Total after Tax $109.50
Report:
SKU 1001 (Appliance)
Number on hand: 9 (Inventory is low, place an order)
Cost: $350.00
Title: Fridge
Price: $450.00
Total $ value $4050
SKU 1002 (Furniture) So on and so forth
Expert Solution
steps

Step by step

Solved in 4 steps with 19 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,