Why does the code use both the JOptionPane AND the Scanner class to read input from the user. That would be very confusing. I'd get rid of one of those methods and get all the input using just one...