Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Download: http://solutionzip.com/downloads/program-2b-java/
- Develop an application that
- reads your listings.txt file,
- analyzes the properties
- listed,
- and outputs an overview of
- properties listed to an
- overview.txt file.
- Your
- application should do the
- following:
- 1. Prompt the user for
- the name of the input file
- (listings.txt).
- 2. Open the
- listings.txt file and read in
- property listing information
- using
- a buffered FileReader.
- 3. Count
- the total number of property
- listings for sale.
- Use buffered
- FileWriter to write the count of
- the number of property listings
- to
- your overview.txt file.
- 4.
- Calculate the total value of
- property for sale.
- Use a buffered
- FileWriter to write the total
- value of properties currently for
- sale.
- 5. Store each property id
- into an ArrayList.
- a. Sort the
- ArrayList of property ids using
- natural ordering.
- b. Use a for-
- each loop to iterate through the
- sorted ArrayList and write
- property
- ids to overview.txt file
- using buffered FileWriter.
- 6. Use
- buffered FileWriter to write the
- total value of the properties
- listed and the total number of
- properties currently for sale.
- Here is the listings file and
- Overview example:
- 110001
- commercial 500000.00 101
- 110223 residential
- 100000.00 101
- 110020
- commercial 1000000.00 107
- 110333 land 30000.00 105
- 110442 farm 200000.00 106
- /p>
- 110421 land 40000.00 107
- 112352 residential
- 250000.00 110
- Example
- overview.txt file:
- Total
- properties listed: 7
- Total
- value of properties listed:
- 2120000.00
- 110001
- 110020
- 110223
- 110333
- 110421
- 110442
- 112352
- Download: http://solutionzip.com/downloads/program-2b-java/
Advertisement
Add Comment
Please, Sign In to add comment