Write the following program in c++ A special tax regulation allows an employee t
ID: 3537181 • Letter: W
Question
Write the following program in c++
A special tax regulation allows an employee to set aside earnings to pay for qualified medical expenses and other items.
At LocalPharm, a privately owned pharmacy, codes are assigned to each product. If the code starts with an 'C', 'D', or 'H', the item is eligible for reimbursement. Otherwise, the product is not.
You are given two input files, inventory.txt and customerlist.txt. The inventory.txt file contains 11 records and has LocalPharm's inventory. Each record contains an inventory code, an item description, and a cost. The customerlist.txt file has 6 records and each record has the customer name, the inventory code and the quantity.
Inventory.txt
customerlist.txt
Write a program (project4.cpp) that inputs the records contained within files (inventory.txt and customerlist.txt) listing LocalPharm%u2019s inventory and the customer list. Your program should output a list of all inventory items into an output file named project4.out. This program must output a list of all customer orders into the output file project4_1.out. For items that are eligible for reimbursement, the term %u201CQualified Expense%u201D should appear next to the item in your output in both output files.
Your program must have the following functions:
1. A value returning function called message that will display the following. The return type of the function is a string. Please note that this message will be first displayed in the project4.out file.
2. A void function called printTitle with one parameter, the ofstream variable. This function must print the report title as shown in the output file in project4.out.
3. A void function called readData will read the data from inventory.txt. This function has four parameters, the ifstream variable, the code, the item and the cost.
4. void function called fileClose to close the input and output files.
Inventory.txt
Explanation / Answer
// the code will gono take some time i will post the code after 2 or 3 hours, actually i saw your reply a liitle bit later.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.