Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class menu {
- public static void main(String[] args){
- Scanner in = new Scanner (System.in);
- int a = 1;
- while (a==1){
- System.out.println("Test Program to create a new User:");
- System.out.println("[1]Show list of Registered Usernames.");
- System.out.println("[2]Show list of Registered Emails.\n\n");
- System.out.println("[3]Test new username.");
- System.out.println("[4]Test new email.");
- System.out.println("[5]Test password validation.");
- System.out.println("[6]Test date of birth validation.");
- int checker;
- String input = in.next();
- in.close();
- if (input.equals("1")){
- System.out.println("Registered Usernames are: ");
- System.out.println(.get);
- }
- if (input.equals("2")){
- System.out.println("Registered Emials are: ");
- System.out.println(.get);
- }
- if (input.equals("3")){
- checker = 1;
- while(checker == 1){
- String username = in.next();
- in.close();
- if(chekcusername)
- checker = 2;
- }
- }
- if (input.equals("4")){
- checker = 1;
- while(checker == 1){
- String email = in.next();
- in.close();
- if(listOfEmails email){
- checker = 2;
- }
- }
- }
- if (input.equals("5")){
- String password = "pwd1";
- String cPassword = "pwd2";
- while(password.compareTo(cPassword) == 0)
- {
- password = in.next();
- in.close();
- cPassword = in.next();
- in.close();
- }
- }
- if (input.equals("6")){
- String bDay = "sdasas";
- checker = 0;
- while(checker == 1){
- bDay = in.next();
- in.close();
- if(today - bDay)
- {
- checker = 2;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement