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
There should be total in output file. Picture above shows read.txt file and output file after calculations
if you need data of read.txt file
Purchased Rehab Cost ($) TotalCost ($) Price Sold($)
Price ($)
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
141 Cross Avenue $90,000 $5,247 $95,247 $117,004
1529 seton $157,000 $36,671 $193,671 $155,743
16 MALVERN ROAD $108,000 $53,589 $161,589 $184,082
1642 COLEMAN STREET $49,000 $30,398 $79,398 $119,040
19 Mavista Circle $19,106 $59,702 $78,808 $46,062
200 BEAU TREE DRIVE $300,000 $83,457 $383,457 $362,000
21 CREEK LANE $106,000 $0 $106,000 $120,600
21 MAPLEWOOD LANE $172,000 $71,665 $243,665 $294,846
Total Houses Sold: 14 $1,526,708 $577,961 $2,104,669 $2,176,567
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started