I don't really know how to ask the question, because I don't really know how am I suppose to do it(the codes required)...
I need to seperate the two type in the create, and logging-in without needing to again the type..
//register
System.out.println("Enter Username: ");
user = in.nextLine();
System.out.println("Enter Password: ");
pass = in.nextLine();
System.out.println("Type: ");
type = in.nextLine();
if("admin".equals(type)){
// register as an admin type
}
if ("consumer".equals(type)){
//register as consumer }
//login
System.out.println("Username:")
username = in.nextLine();
System.out.println("Password: ")
password = in.nextLine();
if(//type = admin type){
admin();
}
if(//type = consumer type){
consumer();
}
Aucun commentaire:
Enregistrer un commentaire