Programming Activity # 7 - Arrays and File Handling
Programming Activity # 7 - Arrays and File Handling
Activity#7
Instructions: Copy the codes and screenshots of the result into an MS Word file and name it using
your last name. Convert your file from MS Word to PDF format before uploading it to this assignment
page. Attached below is a file containing sample codes for writing and reading data using a file.
Performance Task: Create a program that will create a list of contacts of 10 persons. Name your
text file with “phonebook.txt” that contains data items to be stored: name, birthday, gender, age, and
contact number. The program allows the user to input data and store it in a "phonebook.txt" file, and
read the data from the text.
package Activity7;
import java.io.*;
import java.util.Scanner;