Advertisement
Guest User

Untitled

a guest
Jun 16th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. package User;
  2. import marios.Database;
  3. import java.util.Scanner;
  4. public class User {
  5. private
  6. String username;
  7. String password;
  8.  
  9.  
  10. User() {
  11. username = "N/A";
  12. password = "N/A";
  13. }
  14.  
  15. void Register() {
  16.  
  17. }
  18.  
  19. void LogIn() {
  20.  
  21. }
  22.  
  23. void Display() {
  24. String ans;
  25. Scanner keyboard = new Scanner(System.in);
  26. System.out.println("If you are a new user type 'yes' to register, otherwise type 'no' to log in.");
  27. ans = keyboard.next();
  28. String Exit = null;
  29. do {
  30. switch (ans) {
  31. case "yes":
  32. System.out.println("Please type your Username and your Password to register:");
  33. Register();
  34. break;
  35. case "no":
  36. System.out.println("Type your Username and Password to continue");
  37. LogIn();
  38. break;
  39. }
  40. System.out.println("If you want to exit type: y");
  41. Exit = keyboard.next();
  42. }while(!Exit.equals("y"));
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement