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

  How much money the new windows will save the home

The owner of an older house in Wichita, Kansas, is considering replacing the existing double-door type wood framed single-pane windows with vinyl-framed.

  How will prices of digital calls struck at hundared compare

Suppose two smiles have the same implied volatility at 100. One smile is downwards sloping and the other one is upwards sloping. How will the prices of digital calls struck at 100 compare?

  What is the fourth number to be printed out

How mzany numbers will be printed out after executing the above algorithm? How many subscripts does a three dimensional array require?

  Prepare throughout the class should be prepared using apa

Milestone One-The project document you will prepare throughout the class should be prepared using APA guidelines. The paper should be double-spaced, using Arial or equivalent, 12-point font.

  Write the pseudocode statement for the process

During this course you will design a program for a state university. The university needs a website design that will enable students to order books online.

  Clearly describe the information security issue

Clearly describe the information security issue, Provide a discussion of the cultural/contextual issues associated with the information security issue

  Develop an overall work breakdown structure for system

Develop an overall work breakdown structure (WBS) for the 7 system development life cycle (SDLC) phases: Preliminary Analysis, System Analysis or Requirements Definition and System Design.

  Calculate the cost installing a fence around a rectangular

Create an application that can be used to calculate the cost installing a fence around a rectangular area.

  The employee confirms with the bank that everything has

The employee confirms with the bank that everything has, indeed, been straightened out

  Explain basic wireless network maintenance functions

Occasionally after upgrading firmware, the antennas in your wireless network want to be adjusted. What technology may someday eliminate this need for antenna maintenance.

  Questionnewtown records has determined to store information

questionnewtown records has determined to store information about musicians who perform on its albums in a database.

  Find the initial interval for the root search

Write down the corresponding MATLAB code. You should check (just for yourself) how your function works with an arbitrary unsorted array.

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