//Eric Bauer //Homework #09 Excercise 5.12 import javax.swing.*; import java.awt.Graphics; public class Histogram extends JApplet { int arr[] =new int[5]; public void init () { int x; String input; for (x=0;x<5;x++){ input=JOptionPane.showInputDialog("Enter a number between 1 and 30 here"); arr[x]=Integer.parseInt(input); }//end for }//end method init public void paint (Graphics g) { int x; for (x=0;x<5;x++){ g.fillRect(25,25*x+25,arr[x]*10,20); }//end for }//end method paint }//end class Histogram