Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please in simple C++ Write a modularized, menu-driven program to read a file with the unknown number of records. The input file has an unknown

please in simple C++

Write a modularized, menu-driven program to read a file with the unknown number of records.

  • The input file has an unknown number of records of inventory items (may be empty); one record per line in the following order: item ID, item name (one word), quantity on hand, and a price
  • All fields in the input file are separated by a tab (\t) or a blank ( up to you)
  • All items are unique
  • Item Id and name do not require error checking
  • Create a menu (use a switch statement) which allows to
    • print the inventory unsorted
    • print the inventory sorted in ascending order; you should allow a user sort by any field: item ID, item name (one word), quantity on hand, or price. Write one function, that can sort by any field using array of pointers. Do not copy and paste sort code five times into the same function. Bubble sort is the easiest to modify.
    • search for an item by ID or name; a user should be able to enter the name of the item using any case, (for example, sTRolleR). You may wish to store items in all lower/upper case to expedite the search.
    • print a report with the following details
      • number of unique items in the inventory
      • the total worth of the inventory and the total count of all items in the inventory
    • quit the program
  • A user should be able to run many as many times as a user wants
  • Use array of structs if you do not know how to write classes yet
  • Thoroughly test your program. Your grade partially depends on the quality of your test data.
  • This a and all other programs in this course must comply with the Guidelines and Standards posted under Resources
  • Clearly label the output

Record sample:

997196478 StroLLer 25 134.78

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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_2

Step: 3

blur-text-image_3

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

Database And Expert Systems Applications 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446

Authors: Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou

2012th Edition

3642325998, 978-3642325991

More Books

Students also viewed these Databases questions

Question

Explain the differences between a Gantt chart and a PERT/CPM chart.

Answered: 1 week ago

Question

Differentiate between blogs and wikis?

Answered: 1 week ago