[SOLVED] CSE110 -Principles of Programming with Java - Lab 12

30.00 $

Category:

Description

5/5 - (1 vote)

This program is for practicing File IO. You need to develop People Class and PhoneBook Class to construct a simple system that can manage the functions of PhoneBook.

Part1:

In this Lab, you should first use your program to complete following tasks on your own computer:

  • Add one record, name: Jack, number: 1234567890
  • Add one record, name: Anna, number: 2345678901
  • Save your current records Part2:

 

Getting Started:

People Class

 

 

PhoneBook Class

Here is the template of PhoneBook Class:

 

Here is the Coding guideline:

 

 

Command Program: Lab12

Here is the template of Lab12 Class:

 

Here is the Coding guideline:

 

 

 

Sample output1:

Select the action that you want to perform:

  1. Add a record.
  2. Delete a record.
  3. Read records from file.
  4. Save your records.

Enter action number (1-5):

1

Input the name of the record:

Jack

Input the phone number of the record:

1234567890 name number

Jack 1234567890

Select the action that you want to perform:

  1. Add a record.
  2. Delete a record.
  3. Read records from file.
  4. Save your records.

Enter action number (1-5):

Input the name of the record:

Anna

Input the phone number of the record:

2345678901 name number Jack 1234567890

Anna 2345678901

Select the action that you want to perform:

  1. Add a record.
  2. Delete a record.
  3. Read records from file.
  4. Save your records.

Enter action number (1-5):

4

Save Successfully!

Select the action that you want to perform:

  1. Add a record.
  2. Delete a record.
  3. Read records from file.
  4. Save your records.

Enter action number (1-5):

5

Exiting the Program…

 

Sample output2:

Select the action that you want to perform:

  1. Add a record.
  2. Delete a record.
  3. Read records from file.
  4. Save your records.

Enter action number (1-5):

3

name number Jack 1234567890

Anna 2345678901

Select the action that you want to perform:

  1. Add a record.
  2. Delete a record.
  3. Read records from file.
  4. Save your records.

Enter action number (1-5):

2

Input the name of the record you want to delete:

Jack name number

Anna 2345678901

Select the action that you want to perform:

  1. Add a record.
  2. Delete a record.
  3. Read records from file.
  4. Save your records.

Enter action number (1-5):

5

Exiting the Program…