Chat with us, powered by LiveChat Write a program called TextFileIO.java to create a file | Writedemy

Write a program called TextFileIO.java to create a file

Write a program called TextFileIO.java to create a file

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 following

2,4,6,8,10,12,14,……,98,100
2,4,6,8,10,12,14,……,98,100,1,3,5,7,9,……..97,99

Grading Rubric

Text File I/O Points Description
Standard header included 1 Must contain program’s name, student name, and description of the program
Program compiles 2 Program does not have any error
Program executes 2 Program runs without any error
Program creates “numbers.dat” file 2 The file numbers.dat exists and is readable
Program writes all even number integers from 1 to 100, separated by commas 2 All even numbers from 1 to 100 are written to the file. A comma separates each number.
File is closed 1 The file is closed after even numbers are processed
File is re-opened for reading 1 The file is re-opened for reading the even numbers and commas
Program displays even integers 1 Program displays even numbers from 1 to 100 separated by commas
Odd numbers from 1 to 100 separated by commas are appended 2 Odd numbers from 1 to 100 are appended to the file. A comma separates each number.
File is closed 1 The file is closed after odd numbers are processed
File is re-opened for reading 1 The file is re-opened for reading the even and odd numbers separated by commas
File contents are displayed 1 The contents of the file are displayed correctly, showing each number separated by a comma
Correct output is displayed 5 Program displays the correct output as described above
Subtotal 20

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order