Purchase Solution

C++ program using parallel vectors

Not what you're looking for?

Ask Custom Question

Write a program to keep track of a hardware store's inventory. The sore sell various items. For each item in the store the following information is kept: item ID, item name, number of pieces ordered, number of pieces currently in the store, number of pieces sold, manufacturer's price for the item, and the stores selling price. At the end of the week the store manager would like to see a printed report.

The total inventory is the total selling value of all the items currently in the store. The total number of items is the sum of the number of pieces of all the items in the store.

The program must be menu driven giving the users various choices such as checking whether an item is in the store, selling an item and printing the report. After inputing the data, sort it according to the items names. Also, after an item is sold, update the appropriate counts.

Initially, the number of pieces (of an item) in the store is the same as the number of pieces ordered, and the number of pieces of an item sold is zero. Input to the program is a file consisting of data in the following form: ItemID, ItemName, pOrdered, manufPrice, sellingPrice.

Use seven parallel vectors to store the information. The program must contain at least the following functions: one to input data into the vectors, one to display the menu, one to sell an item and one to print the report for the manager.

Since I am just learning C++ the solution may need to be "dummied down" a little bit (or a lot) so that I can understand how the code is working.

Purchase this Solution

Solution Summary

A C++ program is developed to keep track of a hardware store's inventory. Using parallel vectors is demonstrated.

Purchase this Solution


Free BrainMass Quizzes
Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.