Create a phonebook application that stores name/number pairs, looks up by name o
ID: 3635351 • Letter: C
Question
Create a phonebook application that stores name/number pairs, looks up by name or number, and provide persistent storage of data.This assignment will provide experience with:
• Classes
• Methods
• Arrays
• string
• file I/O
Design the class Phonebook and create a UML diagram.
public class Phonebook {
//data fields
private String[] names;
private int[] phoneNumbers;
// constructors
…
//methods
…
}
Methods
Design methods to implement the following functionalty:
• input names and phone numbers provided by a user;
• input names and phone numbers written from a file;
• look up a name by a number;
• look up a number by a name;
• look up a number by a partial name (e.g., “Jo”);
• output information in pairs (name, number) to a screen;
• output information in pairs (name, number) to a file.
Create a test program to check all the methods.