Write a class BarChart with methods
public void add(double value)
public void draw(Graphics2D g2)
that displays a chart of the added values. You may assume that all added values are positive. Stretch the bars so that they fill the entire area of the screen. You must figure out the maximum of the values, and then scale each bar.
Here is a sample program output: