Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
- /**
- * Created by Shinichi on 2016-10-23.
- */
- public class Interface {
- public static void main(String[] args) throws IOException {
- // Prints "Hello, World" to the terminal window.
- BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
- System.out.print("Enter a Name: ");
- String name= br.readLine().toString();
- System.out.print("Enter a Username: ");
- String username= br.readLine().toString();
- System.out.print("Enter a Email: ");
- String email= br.readLine().toString();
- System.out.print("Enter a Password: ");
- String password= br.readLine().toString();
- UserService instance= new UserServiceImpl();
- User bolo = new User();
- bolo.setName(name);
- bolo.setUsername(username);
- bolo.setEmail(email);
- bolo.setPassword(password);
- instance.addUser(bolo);
- System.out.print("Dodano użytkownika ^^");
- User ben= instance.getUser(username);
- System.out.print(ben.getName());
- System.out.print(ben.getUsername());
- System.out.print(ben.getEmail());
- System.out.print(ben.getPassword());
- System.out.print("Podaj jego nazwe i hasło:" );
- String username2= br.readLine().toString();
- instance.removeUser(username2);
- System.out.print("Usunięto użytkownika");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement