PHONE BOOK APPLICATION | ADD | MODIFY | DELETE | RMI

Опубликовано: 31 Октябрь 2024
на канале: Basic Code
508
15

Create a remote phone book server that maintains a file of names and phone
numbers. Define interface PhoneBookInterface with the following methods:
public PhoneBookEntry[] getPhoneBook()
public String addEntry( PhoneBookEntry entry )
public String modifyEntry( PhoneBookEntry entry )
public String deleteEntry( PhoneBookEntry entry )
Create remote object class PhoneBookServerImpl, which implements
interface PhoneBookInterface . Class PhoneBookEntry should contain String instance variables that represent the first name, last name and phone number for one person. The class should also provide appropriate set/get methods and perform validation on the phone number format. Remember that class PhoneBookEntry also must implement Serializable, so that RMI can serialize objects of this class.