1. Using a text editor or wordprocessor, create a text file holding a series of

 

surnames and payroll numbers (at least five of each). For example:

Smith

123456

Jones

987654

Jenkins

555555

Now write a Java program that uses a while loop to read values from the above

text file and displays then in a table under the headings 'Surname' and 'Payroll

No.'. (Don't be too concerned about precise alignment of the columns.)

2. Take a copy of the above program, rename the class and modify the appropriate

line so that the program accepts input from the standard input stream (i.e., using

Scanner around the standard input stream, System.in). Then use redirection to

feed the values from your payroll text file into your program (displaying the

contents as before).

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!