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

  Information systems typically support different work

information systems typically support different work models. you have been asked to create a report on what work

  Difference between stratified and random sampling

What is the difference between stratified and random sampling and what were the similarities and differences between oneperquad and twoperquad? Be sure to explain pattern, dispersion, and density.

  The algorithms of the parallel and perspective projection

I have a java application that reads in a vertex list and face list. I also have code to write 2-D lines and ouput that image file. In my code I have the standard 3D default values defined for: PRP and VRP reference points, VPN and VUP vectors, an..

  Explain why are exceptions particularly suitable for

question 1 why are exceptions particularly appropriate for dealing with errors produced by methods of classes in the

  Explain the emerging enterprise network applications

Select a topic from the following list on which you would like to conduct an in-depth investigation: Emerging enterprise network applications.

  Submit system design of data design and feasibility analysis

Submit system design of an introductory summary, a specification, a data design, a user interface design, a system architecture, and a feasibility analysis.

  Write a function called ismagic that takes a 2d array

Write a function called isMagic that takes a 2D array and returns true if the 2D array is a magic square and false otherwise.

  Questionconsider an adt called square matrix the matrix can

questionconsider an adt called square matrix. the matrix can be represented by a 2-dimensional array of integers with n

  Write a function which is p assed a list

Write a function which is p assed a list, and returns a list whose elements are in the reverse order of the original list.

  Create a program generates a 3-digit random number 100 times

Write down a C# application that generates a 3-digit random number 100 times. Display the output for each of the generated numbers and the sum of all 100 numbers. Every 10th number you should display a String consisting of a any phrase of your cho..

  Determine the maximum number of deviations

Sample Results Evaluation. Kendall Jackson, CPA, is examining the operating effectiveness of the internal control of Town Mo, a large conglomerate in the music.

  Discuss problem of using lines-of-code productivity metric

Discuss the problem of using the lines-of-Code productivity metric (DS1) by comparing a pro-grammar who quickly develops.

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