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

  Describe an in-place version of the quick-select algorithm

Describe an in-place version of the quick-select algorithm in pseudo-code. Show that the worst-case running time of quick-select on an nelement sequence is (n2)

  How enhancements should be done and justify the enhancements

Write a 2- to 4-page paper that addresses the above. Provide recommendations for how enhancements should be done and justify the enhancements.

  Consider the three normative theories of business ethics

Consider the three normative theories of business ethics. Briefly describe each - and given an example of an ethical decision in business either real

  Distinguish between a prime and a composite integer

Distinguish between a prime and a composite integer. Define the meaning of relatively prime (co-prime). Define the given functions and their application.

  Design and code a software program that implements

Design and code a software program that implements a restaurant cashier that takes payments and collects and sums up the customer bill.

  Key elements of an entry strategy

Write down the key elements of an entry strategy, especially for the high-tech environment? The answer requires to be of at least 300 words. Also include any references

  Write a java program with two checkboxes

Write a Java program with two checkboxes, one labeled BLUE and the other labeled ORANGE.

  Solutions for various analytics problems

Your task for this analytical project is to use analytical tool (i.e Watson Analytics) to explore, analyze and visualize one of the two given dataset

  What are the benefits of software engineering

What is the appropriate justification for an employee that can be submitted to his/her business line to persuade to accept the study of software engineering.

  How are the models integrated

Do these models cover all important views? How are the models integrated? Is it possible to trace the interaction of issues from one model to another?

  Make sure that the procedure can return the result

Write a PL/SQL procedure that will compute XY+1. Make sure that the procedure can return the result of the computation .

  Why prepaid cell phones make forensic investigation hard

Discuss about how can you quickly investigate and collect digital evidence for a crime what involves a phone call (e.g., you checked the victim's cell phone and you find a phone call from a phone number, this phone number could be a VoIP phone, a ..

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