Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. package packageProva;
  2.  
  3. public class mainClass {
  4.  
  5. public static void main(String[] args) {
  6. // Voce v1;
  7. // Voce v2;
  8. //
  9. // v1 = new Voce("Giorgio","Bruno","100293920");
  10. // v2 = new Voce("Gesu","Cristo","33");
  11.  
  12.  
  13. Rubrica rubrica1 = new Rubrica("Prima rubrica");
  14.  
  15. //toString
  16. System.out.println(rubrica1.toString());
  17.  
  18. //aggiungi
  19. rubrica1.aggiungi("Giorgio", "Bruno", "3333333333");
  20. rubrica1.aggiungi("Marco", "Torchiano", "2222222222");
  21. rubrica1.aggiungi("Alberto", "Pisanello", "1111111111");
  22.  
  23. //primo
  24. System.out.println(rubrica1.primo());
  25.  
  26. //elenco
  27. System.out.println(rubrica1.elenco());
  28.  
  29. //ricerca
  30. System.out.println(rubrica1.ricerca("Giorgio"));
  31.  
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement