Ctt Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 1 Enter the NEW Record Data: Desciption: Coffee Quantity: 20 Wholesale Price: $10 Retail Price: $15 Date Added: 02022018 Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 2 Which Record to DISPLAY: Please choose one of the following... 1 to 1 : 1 Description: Coffee Quantity: 20 Wholesale Price: $10.00 Retail Price: $15.00 Date: 02022018 Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 1 Enter the NEW Record Data: Desciption: TEa Quantity: 30 Wholesale Price: $30 Retail Price: $40 Date Added: 03032018 Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 2 Which Record to DISPLAY: Please choose one of the following... 1 to 2 : 2 Description: TEa Quantity: 30 Wholesale Price: $30.00 Retail Price: $40.00 Date: 03032018 Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 3 Which record to MODIFY: Please choose one of the following... 1 to 2 : 2 Description: TEa Quantity: 30 Wholesale Price: $30.00 Retail Price: $40.00 Date: 03032018 Enter MODIFY Data: Desciption: TEa Powder Quantity: 10 Wholesale Price: $10 Retail Price: $15 Date Added: 03032017 Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 2 Which Record to DISPLAY: Please choose one of the following... 1 to 2 : 2 Description: TEa Powder Quantity: 10 Wholesale Price: $10.00 Retail Price: $15.00 Date: 03032017 Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 4 Thank you! Test CAse2: Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 5 Please enter a valid choice (1 - 4): 4 Thank you!

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
icon
Related questions
Question
Ctt Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 1 Enter the NEW Record Data: Desciption: Coffee Quantity: 20 Wholesale Price: $10 Retail Price: $15 Date Added: 02022018 Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 2 Which Record to DISPLAY: Please choose one of the following... 1 to 1 : 1 Description: Coffee Quantity: 20 Wholesale Price: $10.00 Retail Price: $15.00 Date: 02022018 Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 1 Enter the NEW Record Data: Desciption: TEa Quantity: 30 Wholesale Price: $30 Retail Price: $40 Date Added: 03032018 Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 2 Which Record to DISPLAY: Please choose one of the following... 1 to 2 : 2 Description: TEa Quantity: 30 Wholesale Price: $30.00 Retail Price: $40.00 Date: 03032018 Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 3 Which record to MODIFY: Please choose one of the following... 1 to 2 : 2 Description: TEa Quantity: 30 Wholesale Price: $30.00 Retail Price: $40.00 Date: 03032018 Enter MODIFY Data: Desciption: TEa Powder Quantity: 10 Wholesale Price: $10 Retail Price: $15 Date Added: 03032017 Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 2 Which Record to DISPLAY: Please choose one of the following... 1 to 2 : 2 Description: TEa Powder Quantity: 10 Wholesale Price: $10.00 Retail Price: $15.00 Date: 03032017 Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 4 Thank you! Test CAse2: Inventory Program Menu 1. ADD NEW Record 2. DISPLAY Record 3. MODIFY Record 4. EXIT Program please enter selection (1 - 4) : 5 Please enter a valid choice (1 - 4): 4 Thank you!
DESCRIPTION
Inventory Program
Write a program that uses a structure to store the following inventory information in a Binary file and access it using
Random Access Method:
Item description
Quantity on hand
Wholesale cost
Retail cost
Date added to inventory
The program should have a menu that allows the user to perform the following tasks:
Add new records to the file
Display any record in the file
Change any record in the file
For exact menu option text please see the test cases below:
Mimir file should be: CS939Homework11A.cpp
For data file opening logic, you may use the code segment below: This segment tries to open an existing file, if the
file does not exist, it creates new one. Please note that your data file name should be inventory,dat
fstream inventory;
inventory.open("inventory.dat", iS::out|ios:in|ios:binary );
if (inventory.fail(0)
inventory.open("inventory.dat", ios::outlios:in | ios:binary| ios:trunc ):
if (inventory.fail)
{
cout << "Error opening file..";
return 0;
Transcribed Image Text:DESCRIPTION Inventory Program Write a program that uses a structure to store the following inventory information in a Binary file and access it using Random Access Method: Item description Quantity on hand Wholesale cost Retail cost Date added to inventory The program should have a menu that allows the user to perform the following tasks: Add new records to the file Display any record in the file Change any record in the file For exact menu option text please see the test cases below: Mimir file should be: CS939Homework11A.cpp For data file opening logic, you may use the code segment below: This segment tries to open an existing file, if the file does not exist, it creates new one. Please note that your data file name should be inventory,dat fstream inventory; inventory.open("inventory.dat", iS::out|ios:in|ios:binary ); if (inventory.fail(0) inventory.open("inventory.dat", ios::outlios:in | ios:binary| ios:trunc ): if (inventory.fail) { cout << "Error opening file.."; return 0;
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Header Files
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
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education