Question: IN JAVA Using Java I/O streams, write a program that opens the file read.txt. Reads the data from the file into a class object. You

IN JAVA

Using Java I/O streams, write a program that opens the file "read.txt.

Reads the data from the file into a class object. You will need to create a class object , and then, an array to store the information.

Calculates the followings, and write the entire information back into a file called output.txt

NetIncome = Price Sold Total Cost

Taxes = 30% of NetIncome

P&L= NetIncome Taxes

% Gain/Loss = Price Sold/Total Cost

Sample Data

read.txt

Property Name

Purchased Price ($)

Rehab Cost ($)

TotalCost ($)

Price Sold($)

1024 BROWN STREET

$33,000

$0

$33,000

$18,300

112 Alvil Road

$80,000

$50,419

$130,419

$133,061

113 CYPRESS DRIVE

$109,600

$30,266

$139,866

$149,269

124 Bradley Circle

$133,302

$75,693

$208,995

$196,807

135 WHITBURN PLACE

$69,700

$32,394

$102,094

$117,581

138 BROOKSIDE BLVD

$100,000

$48,462

$148,462

$162,171

Sample Output.txt

Property Name

Purchased Price ($)

Rehab Cost ($)

TotalCost ($)

Price Sold($)

NetIncome($)

Taxes ($)

$(P&L)

% Gain/Loss

1024 BROWN STREET

$33,000

$0

$33,000

$18,300

($14,700)

$0

($14,700)

-45%

112 Alvil Road

$80,000

$50,419

$130,419

$133,061

$2,642

$793

$1,849

1%

113 CYPRESS DRIVE

$109,600

$30,266

$139,866

$149,269

$9,403

$0

$9,403

7%

124 Bradley Circle

$133,302

$75,693

$208,995

$196,807

($12,188)

$0

($12,188)

-6%

135 WHITBURN PLACE

$69,700

$32,394

$102,094

$117,581

$15,488

$4,646

$10,841

11%

138 BROOKSIDE BLVD

$100,000

$48,462

$148,462

$162,171

$13,709

$4,113

$9,596

6%

Don't worry about tables. Output should be in basic text file and have same attributes as shown in read and output file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!