Rewrote from JOptionPane to Scanner

Rewrote Problem one to use the Scanner utility instead of JOptionPane.