So I've made a bit of the directory and I want to make a tester that tests the methods that I've declared. The code for the directory is shown below.
package TelephoneDirectory;
public class TelephoneDirectory {
String name;
String telnumber;
/**
*
* @param name a person's name
* @param telno a person's telephone number
*/
public TelephoneDirectory(String name, String telno){
this.name = name;
this.telnumber = telno;
}
public String getName(){
return name;
}
public String getNumber(){
return telnumber;
}
public void setNumber(String telno){
telnumber = telno;
}
@Override
public String toString(){
return name + "\t"+telnumber;
}
public String format(){
return "Name: " + name + "\tTelephone: "+telnumber;
}
}
And so far with the tester, I have as shown below:
package TelephoneDirectory;
/**
*
* @author matt
*/
public class DirectoryTester {
public static void main(String[] args)
{
System.out.println(" ");
}
}
I'm really stuck on this and any help would be great :)