This problem has been solved!
You'll get a detailed solution from a subject matter expert that helps you learn core concepts.
See AnswerQuestion: it to the standard output. For each statement, the first line should display the person's name. The following lines should list the objects they purchased along with the amount paid for each object (one object per line). Finally, the last line should print "Total: value", where value is the sum of all payments. For example, for the given inputs
the standard output. For each statement, the first line should display the person's name. The following lines should list the objects they purchased along with the amount paid for each object object per line Finally, the last line should print "Total: value", where value the sum all payments. For example, for the given inputs and people. should print:BobeggspenTotal:AliceappleeggsTotal:Your program should validate the structure the input files and display appropriate error message any issues are found. For example, people. empty, should print a message such : 'The people. file empty. Similarly, a line missing item, the payment not a valid integer floatingpoint number, the program should generate error message. For instance, payments contains a line like this:Alicehave something like this:Alice pen twoshould generate appropriate error message. assume there are empty lines between the data, all people's names start with a capital letter, and all other letters both names and objects are lowercase. Additionally, assume that a single space separates names and payments. Finally, the numbers payments are assumed have most two digits after the decimal point. Therefore, you not need validate these aspects.Please follow this format precisely, with additional output, I will running your programs through automated tests. The tests will use own files payments. and people. with the same format the above examples, but may involve different data.Your solution should make appropriate use least one class and least one container.CourseworkThere a single coursework this module, counting for the overall module mark.This coursework due Sunday December. with all modules, this deadlinehard. "Submission" below for the procedure for applying for extensions.This coursework simulates a simple database operation, and provides practice with classesand standard containers. does not require any features covered after sessionDescriptionThe file payments. contains a simple textual table. Each line lists three piecesinformation: a person's name, object name, and the price the object purchased the person,separated one space, :Bob eggsAlice appleAva penBob penAlice eggsmeaning the units depends the objects, and need not concern You may assume thatperson and object names not contain spaces. The records are not any special order. You mayassume that any combination person and object Bob eggs occurs most once.read this file, you will need use the class ifstream, which derived from istream,like :#include the standard output. For each statement, the first line should display the person's name. Thefollowing lines should list the objects they purchased along with the amount paid for each objectobject per line Finally, the last line should print "Total: value", where value thesum all payments. For example, for the given inputs and people.should print:BobeggspenTotal:AliceappleeggsTotal:Your program should validate the structure the input files and display appropriate errormessage any issues are found. For example, people. empty, should printmessage such : 'The people. file empty. Similarly, a line missingitem, the payment not a valid integer floatingpoint number, the program shouldgenerate error message. For instance, payments contains a line like this:Alicehave something like this:Alice pen twoshould generate appropriate error message. assume there are empty lines betweenthe data, all people's names start with a capital letter, and all other letters both names andobjects are lowercase. Additionally, assume that a single space separates names andpayments. Finally, the numbers payments are assumed have most two digits afterthe decimal point. Therefore, you not need validate these aspects.Please follow this format precisely, with additional output, I will running your programs through automated tests. The tests will use own files payments. andpeople. with the same format the above examples, but may involve different data.Your solution should make appropriate use least one class and least one container.can you please provde exact code solution and detailed steps with expleantions- There are 3 steps to solve this one.SolutionStep 1View the full answer
Overview:
Coursework requirs to write a C++ you program that reads two files,
payments.txtandpeople...Step 2UnlockStep 3UnlockAnswerUnlock
Not the question you’re looking for?
Post any question and get expert help quickly.