A hardware store sells the following hardware tools: screwdriver, wrench, and tape measure. You are asked to find out the profit for the store based on the number of tools sold and their sale price as follows: profit of a screwdriver is 5% of the sale price; profit of a wrench is 8%, and profit of a tape measure is 10%.
You need to follow the following interfaces:
Your classes implementing the above two interfaces should NOT have any other public methods except a toString() method.
Your program should read input from a text file, add the indicated parts to the store, print out the sale information for each part, and then print out the store’s total profit. See the ex input and output below.
The first line of input will be the number of parts. Each line after that will contain a single part – consisting of the type of part, the sale price, and the amount sold. The data is separated by commas.
200 wrenches at $10.97
600 wrenches at $20.22
150 screwdrivers at $8.99
550 screwdrivers at $12.55
20 screwdrivers at $12.55
150 tape measures at $3.99
230 tape measures at $6.99
Total Profit is $1791.80