Displays the total amount for each service category

Question # 00766602 Posted By: fucrank Updated on: 06/24/2020 06:03 AM Due on: 06/28/2020
Subject Computer Science Topic General Computer Science Tutorials:
Question
Dot Image

 

A hotel salesperson enters sales in a text file. Each line contains the following, separated by semicolons: The name of the client, the service sold (such as Dinner, Conference, Lodging, and so on), the amount of the sale, and the date of that event. Write a program that reads such a file and displays the total amount for each service category. Display an error if the file does not exist or the format is incorrect.

?? P7.17Write a program that reads a text file as described in Exercise P7.16, and that writes a separate file for each service category, containing the entries for that category. Name the output files Dinner.txt, Conference.txt, and so on.

 

Dot Image

Click chat on right side to get answer. Click on Chat
Whatsapp Lisa