Generate sales-report files for set of traveling salespeople

Assignment Help Computer Engineering
Reference no: EM132196198

Write a C++ program that generates sales-report files for a set of traveling salespeople. The salespeople call in their sales to a fulfillment desk, where the sales are all entered into a file.

Each sale is recorded as one line on the file sales.dat as a salesperson last name (use enumeration type and make up the names), an item number, and a quantity, with all three items separated by blanks. There are 10 salespeople.

The company sells eight different products, with IDs numbered 7 through 14 (some older products have been discontinued). The unit prices of the products are given here: Product Number Unit Price 7 345.00 8 853.00 9 471.00 10 933.00 11 721.00 12 663.00 13 507.00 14 507.00.

The program reads in the sales file, and generates a separate file for each salesperson containing just his or her sales. Each line from the sales file is copied to the appropriate salesperson's file, with the salesperson's name omitted.

The file names should be the name of the salesperson with .dat appended (you may have to adjust names that don't work as file names on your computer, such as hyphenated names or names with apostrophes). The total for the sale (quantity times unit price) is then appended to the record.

At the end of processing, the total sales for each salesperson should be output with informative labels to cout. Use functional decomposition to design the program.

Make sure that the program handles invalid salesperson's names. If a salesperson's name is invalid, write out an error message to cout. If a product number is invalid, write the error message to the salesperson's file and don't compute a total for the sale.

Reference no: EM132196198

Questions Cloud

Write research paper realated to history : Choose a key battle instead of a whole war, for example. If you have any questions on subject matter, please contact your instructor
Find weight and potential energy associated with a body : Write a C program that finds weight and potential energy associated with a body falling from a height (h) and mass (m).
Prepare a program to display the sum array : Write a C program that inputs 5 elements into each of 2 integer arrays. Add corresponding array elements, that is array1[0] + array2[0], etc.
Find the fibonacci series using recursion : Write a C program to find the Fibonacci series using recursion. The user inputs a 64-bit non-zero positive integer n.
Generate sales-report files for set of traveling salespeople : Write a C++ program that generates sales-report files for a set of traveling salespeople.
Discuss immigration trends that accurrsd in your stats : Discuss immigration trends that accurrsd in your stats bsmssn EDIE-U and 200? and make suggestians far dealing with issues arising from same at these trends.
Write a program to calculate the hashing table of input data : Write a program to calculate the hashing table of input data. The program reads from the standard input the table size k.
Determine the evolution of the concentration : Determine the evolution of the concentration of A within the container. In the second part, repeat it but this time consider that A reacts with B according
Was communism in many ways no different than nazism : 1. Was Communism in many ways no different than Nazism? Discuss.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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