import java.util.ArrayList;
public class ContactList
{
private ArrayList<Contact> contactList;
private String contactType;
public ContactList()
{
contactList = new ArrayList<Contact>();
}
public void addPersonalContact(String fName, String sName, String street, String town, String partOnePC, String partTwoPC, String phoneNumber)
{
contactList.add(new AddPersonalContact(fName, sName, street, town, partOnePC, partTwoPC, phoneNumber));
}
public void addBusinessContact(String fName, String sName, String street, String town, String partOnePC, String partTwoPC, String eMail)
{
contactList.add(new AddBusinessContact(fName, sName, street, town, partOnePC, partTwoPC, eMail));
}
public String toString()
{
String output = "All Contacts:\n";
for (ContactList contact : contactList)
{
output = output + account + "\n\n" ;
}
return output;
}
}