Help needed ASAP! Language: JAVA Fill in your code for the following program that takes two words as input from the keyboard, representing a user ID and a password, then the program does the...


Help needed ASAP!


Language: JAVA


Fill in your code for the following program that takes two words as input from the keyboard, representing a user ID and a password, then the program does the following:




  • If the user ID and the password match “admin” and “open”, respectively, then output “Welcome”.




  • If the user ID matches “admin” and the password does not match “open”, output “Wrong password”.




  • If the password matches “open” and the user ID does not match “admin”, output “Wrong user ID”.




  • Otherwise, output “Sorry, wrong ID and password”.





import java.util.Scanner;


public class Login{


public static void main(String[] args){


Scanner scan = ____ Scanner(________);//instantiate a Scanner object


String userID = scan._________; // read the user ID


String password = scan.__________; // read the password





if(________________________________)


{


System.out.println("Welcome");


}



else if(___________________________)


{


System.out.println("Wrong password");


}


else if(____________________________)


{


System.out.println("Wrong user ID");


}


else


{


System.out.println("Sorry, wrong user ID and password");


}


}


}



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here