akosiraff

TextFileIO Java

Jan 31st, 2013
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/textfileio-java/
  3. Quick TextFileIO.java program to create a file named numbers.dat.
  4. Then create an algorithm that writes all even numbered integers
  5. from 1 to 100, separated by a comma.
  6. After the file has been created, close and reopen the file and
  7. display the results to the screen.
  8. After the results have been displayed append the odd number
  9. integers from 1 to 100,
  10. separated by a comma to the end of the file. Reopen the file and
  11. display the results.
  12. The contents of the file should be the even numbers from 1 to 100
  13. separated by a comma
  14. followed by the odd number from 1 to 100 separated by a comma.
  15. The output of this program would be something like the following:
  16. 2,4,6,8,10,12,14,……,98,100
  17. 2,4,6,8,10,12,14,……,98,100,1,3,5,7,9,……..97,99
  18. The file processing program does not need to be a GUI
  19. application.
  20. Building a GUI for this program is optional.
  21. You should follow the description of each assignment described
  22. under
  23. the iLab and the items listed in the grading rubric when building
  24. your programs.
  25. You want to make sure you are meeting the requirements.
  26. This program does not require user input.
  27. Follow exactly what the description states:
  28. 1. You will write a Java program that will generate a file called
  29. number.dat
  30. 2. In this file you will store all even integers from 1 to 100
  31. (NOT THE SUM of these numbers, please), separated by a comma;
  32. close the file.
  33. 3. Reopen the file and display the contents of the file; even
  34. numbers from 1 to 100 will display
  35. 4. After the results have been displayed append the odd integers
  36. from 1 to 100 (again,
  37. NOT THE SUM of these numbers, please), separated by a comma to
  38. the end of the file.
  39. 5. Reopen the file, and display the results. This second output
  40. should display a line containing
  41. the even numbers separated by comma followed by the odd numbers
  42. separated by comma. For example:
  43. Output of your program:
  44. 2, 4, 6, 8,…., 100
  45. 2, 4, 6, 8,…., 100, 1, 3, 5,…,99
  46. *********/
  47.  
  48. Download: http://solutionzip.com/downloads/textfileio-java/
Advertisement
Add Comment
Please, Sign In to add comment