Details of this Paper

Write a program called TextFileIO.java to create a file

Description

solution


Question

Question;Write a program calledTextFileIO.javato create a file namednumbers.dat. Then create an algorithm that writes all even numbered integers from 1 to 100, separated by a comma. After the file has been created, close and reopen the file and display the results to the screen. After the results have been displayed append the odd number integers from 1 to 100, separated by a comma to the end of the file. Reopen the file and display the results. The contents of the file should be the even numbers from 1 to 100 separated by a comma followed by the odd number from 1 to 100 separated by a comma. The output of this program would be something like the following2,4,6,8,10,12,14,??,98,1002,4,6,8,10,12,14,??,98,100,1,3,5,7,9,??..97,99Grading RubricText File I/OPointsDescriptionStandard header included1Must contain program?s name, student name, and description of the programProgram compiles2Program does not have any errorProgram executes2Program runs without any errorProgram creates "numbers.dat" file2The file numbers.dat exists and is readableProgram writes all even number integers from 1 to 100, separated by commas2All even numbers from 1 to 100 are written to the file. A comma separates each number.File is closed1The file is closed after even numbers are processedFile is re-opened for reading1The file is re-opened for reading the even numbers and commasProgram displays even integers1Program displays even numbers from 1 to 100 separated by commasOdd numbers from 1 to 100 separated by commas are appended2Odd numbers from 1 to 100 are appended to the file. A comma separates each number.File is closed1The file is closed after odd numbers are processedFile is re-opened for reading1The file is re-opened for reading the even and odd numbers separated by commasFile contents are displayed1The contents of the file are displayed correctly, showing each number separated by a commaCorrect output is displayed5Program displays the correct output as described aboveSubtotal20

 

Paper#36616 | Written in 18-Jul-2015

Price : $31
SiteLock