Advertisement
Guest User

Untitled

a guest
Jan 25th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. import java.io.BufferedReader;
  2. import java.io.IOException;
  3. import java.io.InputStreamReader;
  4.  
  5. /**
  6. * Created by Shinichi on 2016-10-23.
  7. */
  8. public class Interface {
  9.  
  10. public static void main(String[] args) throws IOException {
  11. // Prints "Hello, World" to the terminal window.
  12.  
  13. BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  14. System.out.print("Enter a Name: ");
  15. String name= br.readLine().toString();
  16. System.out.print("Enter a Username: ");
  17. String username= br.readLine().toString();
  18. System.out.print("Enter a Email: ");
  19. String email= br.readLine().toString();
  20. System.out.print("Enter a Password: ");
  21. String password= br.readLine().toString();
  22. UserService instance= new UserServiceImpl();
  23. User bolo = new User();
  24. bolo.setName(name);
  25. bolo.setUsername(username);
  26. bolo.setEmail(email);
  27. bolo.setPassword(password);
  28. instance.addUser(bolo);
  29. System.out.print("Dodano użytkownika ^^");
  30.  
  31. User ben= instance.getUser(username);
  32. System.out.print(ben.getName());
  33. System.out.print(ben.getUsername());
  34. System.out.print(ben.getEmail());
  35. System.out.print(ben.getPassword());
  36.  
  37. System.out.print("Podaj jego nazwe i hasło:" );
  38. String username2= br.readLine().toString();
  39.  
  40.  
  41. instance.removeUser(username2);
  42. System.out.print("Usunięto użytkownika");
  43.  
  44.  
  45.  
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement