Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Apr 2017 |
Last Sign in: | 8 Weeks Ago, 4 Days Ago |
Questions Answered: | 4870 |
Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
userRoles userInput = new userRoles(); section of code returns the following error: "cannot find symbol
    userRoles userInput = new userRoles();
    ^
 symbol: class userRoles
 location: class JavaApplication1
/tmp/java_5JTRxt/JavaApplication1.java:23: error: cannot find symbol
    userRoles userInput = new userRoles();
                 ^
 symbol: class userRoles
 location: class JavaApplication1
2 errors"
Â
every time and I cannot figure out why. Any help in understanding this would be appreciated.
Thanks
Â
/** To change this license header, choose License Headers in Project Properties.* To change this template file, choose Tools | Templates* and open the template in the editor.*/package work;import java.io.FileInputStream;import java.security.MessageDigest;import java.util.Scanner;import javax.swing.JOptionPane;public class JavaApplication1 {public static void main(String[] args) throws Exception {Scanner scnr = new Scanner(System.in);FileInputStream admin = null; //file input streamsFileInputStream zookeeper = null;FileInputStream veterinarian = null;//create array based on credentials.txtfinal int NUM_ELEMENTS = 6;String[] storedUsername = new String[NUM_ELEMENTS];String[] role = new String[NUM_ELEMENTS];String[] hashPassword = new String[NUM_ELEMENTS];String username = "";String password = "";String hash = "";String userRole = "";userRoles userInput = new userRoles();int i = 0; //loop variableint j = 0; //loop variableint user = 0;boolean verified = false;//populate username/password arraystoredUsername[i] = "griffin.keyes";hashPassword[i] ="108de81c31bf9c622f76876b74e9285f"; ++i;storedUsername[i] = "rosario.dawson";hashPassword[i] ="3e34baa4ee2ff767af8c120a496742b5"; ++i;storedUsername[i] = "bernie.gorilla";hashPassword[i] ="a584efafa8f9ea7fe5cf18442f32b07b"; ++i;storedUsername[i] = "donald.monkey";hashPassword[i] ="17b1b7d8a706696ed220bc414f729ad3"; ++i;storedUsername[i] = "jerome.grizzlybear";hashPassword[i] ="3adea92111e6307f8f2aae4721e77900"; ++i;storedUsername[i] = "bruce.grizzlybear";hashPassword[i] ="0d107d09f5bbe40cade3de5c71e9e9b7"; ++i;//display usage information for userJOptionPane.showMessageDialog(null, "All entries are case sensitive.\n"+"Enter \"quit\" at any time to exit.", "Authentication System",JOptionPane.PLAIN_MESSAGE);//prompt user for credentialsusername = (String)JOptionPane.showInputDialog(null, "Enterusername: ", "Authentication System", JOptionPane.PLAIN_MESSAGE);if (username.equals("quit")){JOptionPane.showMessageDialog(null, "You have chosen toexit. Goodbye.", "Authentication System", JOptionPane.WARNING_MESSAGE);return;}
-----------