Write a program that reads data from a pipe delimited file, calculates additional information and writes the
Question:
Write a program that reads data from a pipe delimited file, calculates additional information and writes the data back to a file per these requirements.
Using programming concepts learned in class, write a program that does the followings.
1. Opens a pipe delimited file called Prop.txt and reads the data into any array of objects.
a. Note – You can save the file “Prop.txt” into a local directory and read it from the local directory.
2. The program calculates additional information such as below
a. Net Income . This value is calculated as (Price Sold – Total Cost)
b. Taxes . This value is calculated as 35 percent of the net income for each property
c. Profit After Tax . This value is calculated at (Net Income – Taxes)
d. Percentage Gained . This value is calculated as Profit After Tax divided by the (Total Cost)
3. The program creates another file “Prop2.txt”. in your local directory. The program saves all the information read from Prop.txt and the calculated data in step 2 in Prop2.txt.
Program Submission Criteria
- Your class file and test file should be clearly documented and commented.
- All functions should be commented and have a brief description on what the function does.
- Run and compile program.
Submit your java class files and the Prop2.txt file created as part of the program.
When prop2.txt file is created, it should look something like the attached prop2.txt file.
Thermodynamics An Engineering Approach
ISBN: 978-0073398174
8th edition
Authors: Yunus A. Cengel, Michael A. Boles