Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

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.

Step by Step Solution

3.49 Rating (149 Votes )

There are 3 Steps involved in it

Step: 1

Productjava package productcalculation public class Product Double TotalCostVariables defining all the details required for the product Double PriceSold Double NetIncome Double Taxes Double ProfitAfte... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Document Format ( 2 attachments)

PDF file Icon
6092dc172f54b_205154.pdf

180 KBs PDF File

Word file Icon
6092dc172f54b_205154.docx

120 KBs Word File

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Thermodynamics An Engineering Approach

Authors: Yunus A. Cengel, Michael A. Boles

8th edition

73398179, 978-0073398174

More Books

Students also viewed these Mechanical Engineering questions