Write Java FX code for this pseudocode (Login Menu of a game) 1. Ask user to to
ID: 3777693 • Letter: W
Question
Write Java FX code for this pseudocode (Login Menu of a game)
1. Ask user to to select opponent player vs player, player vs computer,view history, or quit.
2. If player chooses player vs player or player vs computer, ask user if he wants to log in, play as guest, or register
3. If user selects login, the LoginMenu object is created and displayed.
4. The function initializeComboBox() is called
5. The combo box is initialized with all allPlayerUsernames
6. User selects his username from the combo box
7. If player object matches the username, it is deserialized and stored in memory
Explanation / Answer
String pass; String user; user = txtUser.getText(); pass = txtPass.getText(); if(pass.equals("blue") && user.equals("bob") ){ lblDisplay.setText("Credentials Accepted."); } else{ lblDisplay.setText("Please try again."); }
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.