Write a program that generates sales-report files

Assignment Help Computer Engineering
Reference no: EM132210161

Question :

Write a 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: EM132210161

Questions Cloud

Display the maximum profit for the drama films : The cost of the film The revenue of the film Type of the film 'D' for drama 'C' for comedy 'A' for action 'R' for romantic.
Generate and displays fibonacci sequence numbers : Write a program that generate and displays Fibonacci sequence numbers.The program should be interactive and display the range of Fibonacci sequence.
A program that gives and takes advice on program writing : Write a program that gives and takes advice on program writing. The pro- gram starts by writing a piece of advice to the screen and asking the user.
What skills are involved in being a radio listener : What skills are involved in being a radio listener? In other words, how is ‘reading' or interpreting the radio program different from ‘reading' a television.
Write a program that generates sales-report files : Write a program that generates sales-report files for a set of traveling salespeople. The salespeople call in their sales to a fulfillment desk.
What is the value of small independent : What is the value of small independent recording companies to the entire recording industry? What would be different about the recording industry.
Identify the problem and uncertainties : Using the Five Step Decision Making Process presented in Chapter 1, examine a recent decision you made (e.g., go to college, take a new job, buy a house).
Company exhibiting strategic organizational communication : What organization do you see as an effective example of a company exhibiting strategic organizational communication?
Evaluate bp efforts to improve sustainability : Evaluate BP's efforts to improve sustainability and its reputation prior to the Deepwater Horizon disaster. Was the company on the right track? Why or why not?

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