If necessary, create a new project named Advanced25 Project and save it in the Cpp8Chap14 folder. Also
Question:
If necessary, create a new project named Advanced25 Project and save it in the Cpp8\Chap14 folder. Also create a new source file named Advanced25.cpp. If you are using Microsoft Visual C++, copy the Advanced25.txt file from the Cpp8\Chap14 folder to the Cpp8\Chap14\Advanced25 Project folder. Use a text editor to open the Advanced25.txt file, which contains the names of the items in inventory, as well as each item’s quantity and price. Close the Advanced25.txt file. Write a program that displays the contents of the file in three columns titled “Name”, “Quantity”, and “Price”. The program should also display a fourth column that contains the result of multiplying each item’s quantity by its price. Use “Value” as the column’s title. (Hint: You can align the columns using '\t', which is the escape sequence for the Tab key.) In addition, the program should calculate and display the total value of the items in inventory. Display the price, value, and total value with two decimal places. Save and then run the program.
Step by Step Answer:
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell