akosiraff

Program 2B JAVA

May 19th, 2013
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/program-2b-java/
  3. Develop an application that
  4. reads your listings.txt file,
  5. analyzes the properties
  6. listed,
  7. and outputs an overview of
  8. properties listed to an
  9. overview.txt file.
  10. Your
  11. application should do the
  12. following:
  13. 1. Prompt the user for
  14. the name of the input file
  15. (listings.txt).
  16. 2. Open the
  17. listings.txt file and read in
  18. property listing information
  19. using
  20. a buffered FileReader.
  21. 3. Count
  22. the total number of property
  23. listings for sale.
  24. Use buffered
  25. FileWriter to write the count of
  26. the number of property listings
  27. to
  28. your overview.txt file.
  29. 4.
  30. Calculate the total value of
  31. property for sale.
  32. Use a buffered
  33. FileWriter to write the total
  34. value of properties currently for
  35. sale.
  36. 5. Store each property id
  37. into an ArrayList.
  38. a. Sort the
  39. ArrayList of property ids using
  40. natural ordering.
  41. b. Use a for-
  42. each loop to iterate through the
  43. sorted ArrayList and write
  44. property
  45. ids to overview.txt file
  46. using buffered FileWriter.
  47. 6. Use
  48. buffered FileWriter to write the
  49. total value of the properties
  50. listed and the total number of
  51. properties currently for sale.
  52. Here is the listings file and
  53. Overview example:
  54. 110001
  55. commercial 500000.00 101
  56. 110223 residential
  57. 100000.00 101
  58. 110020
  59. commercial 1000000.00 107
  60. 110333 land 30000.00 105
  61. 110442 farm 200000.00 106
  62. /p>
  63. 110421 land 40000.00 107
  64. 112352 residential
  65. 250000.00 110
  66. Example
  67. overview.txt file:
  68. Total
  69. properties listed: 7
  70. Total
  71. value of properties listed:
  72. 2120000.00
  73. 110001
  74. 110020
  75. 110223
  76. 110333
  77. 110421
  78. 110442
  79. 112352
  80.  
  81. Download: http://solutionzip.com/downloads/program-2b-java/
Advertisement
Add Comment
Please, Sign In to add comment