CSC113_Tutorial10 - Name: Waleed Saleh Salary: 4000 The...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
King Saud University College of Computer and Information Systems, Department of Computer Science CSC 113: Java Programming-II, Spring2011, February 21, 2011 Tutorial #10 : Text File IO Exercise 1: Write a java program that read several employees information and then write them to a text file. The user should first type the number of employees he wants to enter. Then, the program should continuously ask the user to type in the information of each employee (ID, name, and salary). The program should save all the information in a text file called "employees.txt" . Example: Please enter number of employees: 3 ID: 5623 Name: Abdullah Ahmad Salary: 5000 ID: 8910 Name: Abdulrahman Khalid Salary: 6000 ID: 9012
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Name: Waleed Saleh Salary: 4000 The information has been saved successfully into employees.txt King Saud University College of Computer and Information Systems, Department of Computer Science CSC 113: Java Programming-II, Spring2011, February 21, 2011 Tutorial #10 : Text File IO Exercise 2: Having done Exercise 1 , write another java program that will read the previously generated text file from Exercise 1 (called "employees.txt" ), and print each employee information (ID, name, and salary) from that file. Example (Based on Exercise 1 example input): ID: 5623 Name: Abdullah Ahmad Salary: 5000 ID: 8910 Name: Abdulrahman Khalid Salary: 6000 ID: 9012 Name: Waleed Saleh Salary: 4000...
View Full Document

This note was uploaded on 08/18/2011 for the course COMPUTER S CSC 113 taught by Professor Dr.safwanqasem during the Spring '11 term at King Saud University.

Page1 / 2

CSC113_Tutorial10 - Name: Waleed Saleh Salary: 4000 The...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online