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
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
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Concept explainers
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
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
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: ………………………
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
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
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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 19 images
Knowledge Booster
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.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education