Write a program that incorporates the given features

Assignment Help C/C++ Programming
Reference no: EM131458023

Project- Inventory Management

Note: This project and Project 7 may be done in pairs, but the partners must be different on each project; if not, a 60 point deduction. Also, any code longer than 5 or 6 lines that is identical to another project is grounds for cheating and an automatic 60 point deduction, or with more copying, even a grade of 0 on the project.

Consider a program to enter codes of one to eight characters along with an associated item number and associated notes. A code can represent an item, package, or product's name.

By using such a program, we could enter product quantities and additional notes (i.e. storage considerations) before associating them with some brief code (i.e. string), which would indicate the product's ID. We could then retrieve a product's information by entering the product's ID. This might be a useful application for a small store's inventory and stock management.

Codes are entered as 1 to 8 characters.
Use "e" for enter, "f" for find, "l" for list, "q" for quit.

Command: e Soda
Enter quantity: 20
Enter notes:

Command: e Milk
Enter quantity: 10
Enter notes: Chilled storage

Command: e Chips
Enter quantity: 25
Enter notes: Easily crushed

Command: f Milk
-- Milk
-- 10
-- Chilled storage

Command: f Popcorn
** No entry with code Popcorn

Command: . . .

There is also an "l" command, which will list all entries on the screen.

For the input to this program, upper and lower case letters are considered equivalent. For example, if a product name with the code "Soda" is entered, then the codes "SODA", "soda", and "SOda" will all retrieve the same entry with "Soda" associated.

The entries are to be stored in a file from run to run. When the program begins, the entries in the file are to be read into an array. The array should allow for up to 200 entries. The inventory need not be kept in alphabetical order. You may use a simple sequential search to retrieve entries. When the program is exited, the entries should be stored back in a file for use when the program is run again.

Required Program Characteristics: The assignment is to write a program that incorporates the above features. The entries in the phonebook are to be represented with a simple class:

classEntry {
public:
string name, number, notes;
};
Use an array to store the entries. The array should allow for up to 200 entries.
Entry entryList[200];

Use a function to read the entries into the program from a file, and a function to store the entries back into the file when the program is exited.

void readInventory ()
void storeInventory ()
Also, use a function to list all contacts:
void listAllEntries()

Final Submission:

• In the printouts of the sample runs, each of the commands "e", "f", "l" and "q" should be illustrated.
• You must also show that the external file is updated with entries added from a previous run.

Note: You may wish to use
stringstrToUpper (string S) {
for (size_ti=0; i<S.length(); i++)
S[i] = toupper(S[i]);
return S;
}

Writing to a File
void storeInventory() {
fstream F("PhoneData.txt");
rec_num = 0;
while (rec_num<num_entries){
F <<inventoryList[rec_num].name << " "
<<inventoryList[rec_num].quantity<< " "
<<inventoryList[rec_num].notes<< " " <<endl;
rec_num++;
}
cout<< "Inventory stored." <<endl;
return;
}

Reference no: EM131458023

Questions Cloud

Answer the critical thinking questions : Elaborate on two key learnings from the case related to performance management, appraisals, and the validity and reliable of various methods.
What is an options class : What is an options class? What is an options series? Give examples to illustrate your answer.
What primary purposes do they serve : Q1. Using the Internet, find out more about content management systems (CMSs). What primary purposes do they serve?
Lenin and the use of terrorism : Based on the reading in the text, Lenin and the use Of Terrorism (Links to an external site.), and Marx and Lenin (Links to an external site.).
Write a program that incorporates the given features : The assignment is to write a program that incorporates the above features. The entries in the phonebook are to be represented with a simple class.
What is open interest for a traded options contract : What is open interest for a traded options contract? What does this tell you about the trading interest in a particular options contract?
Matter of corporate social responsibility : Are automobile manufacturer recalls a matter of corporate social responsibility or do they primarily represent compliance issues?
Elements of strict product liability to case : Will Cody recover under strict product liability? Be sure to list and apply the elements of strict product liability to this case.
Analyce the given case of cephalon inc. : Cephalon Inc. (Harvard Business School Case 298116-PDF-ENG). The case introduces students to the use of equity derivatives as part of a risk-management strategy

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd