Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tester.java
- =============================================================================
- package Tester;
- import PhonePkg.PhoneBook;
- public class Tester {
- public static void main(String[] args) {
- PhoneBook myBook = new PhoneBook();
- myBook.addPhone("Lolo", "0501231231");
- myBook.addPhone(" koko ", "039638527");
- myBook.addPhone("koko", "0521234567");
- myBook.addPhone(" joo joo ", "9111369");
- myBook.addPhone("KOKO ", "+972543697415");
- myBook.addPhone("lolo", "+972543697415");
- myBook.addPhone("MoMoMo", "+972543697415");
- myBook.addPhone("#23Mama", "+972772351698");
- myBook.addPhone("77", "049996663");
- System.out.println("\nAll records in my Book:\n" + myBook);
- System.out.println("LOLO is exist? --> " + myBook.isExist("LOLO"));
- System.out.println("joo is exist? --> " + myBook.isExist("joo"));
- System.out.println("koko Phones --> " + myBook.getPhonesOf(" koKO "));
- System.out.println("remove number a from joo joo --> "
- + myBook.removePhone("joo joo", "9111369"));
- System.out.println("remove a number from koko --> "
- + myBook.removePhone("koko", "039638527"));
- System.out.println("\nAfter delete my book Is:" + myBook);
- myBook.getPhonesOf("lolo").clear();
- System.out.println("lolo Phones --> " + myBook.getPhonesOf("lolo"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement