Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package homework6problem1;
- import java.io.*;
- import java.util.*;
- public class Main {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- System.out.println("Enter Command:");
- System.out.println("L - Login");
- System.out.println("N - New User");
- System.out.println("S - Show All User Data");
- System.out.println("E - Exit");
- String x = input.nextLine().toLowerCase();
- while(true){
- if(x.charAt(0) == 'l'){
- System.out.println("username:");
- String username = input.nextLine();
- System.out.println("password:");
- String password = input.nextLine();
- }else if (x.charAt(0) == 'n'){
- int usernames[]={0,0,0,0,0,0} , passwords[]={0,0,0,0,0,0};
- }else if (x.charAt(0) == 's'){
- System.out.println("Id user 1: peter999 password: cucuMber9");
- System.out.println("Id user 2: mary7 password: banA10na");
- System.out.println("Id user 3: Hillary password: seC5rets");
- String x = r;
- }else if (x.charAt(0) == 'e'){
- System.out.println("Good Bye");
- System.exit(0);
- }else{
- System.out.println("input not understood");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement