For this assignment you are to write a graphing application in Java. You will provide the user with a textfield into which they can enter a string of data, a combo-box which allows them to choose between different kinds of graphs (at a minimum, a bar chart, a line graph and a pie chart), and a button that interprets the data provided by the user in graph form. Users will provide data to the system in the form of a comma separated string such as “20,50,10,20,80”. Your application must convert this string into a suitable integer array, and then display the data in the graphing format chosen by the user like so:
For this assignment you are required to manually draw the graphics using the Graphics or Graphics2D library of Java. For the line graph you should use drawLine, for the bar chart you should use fillRect, and for the pie chart you should use fillArc.
Your graphs must cycle through colours for each significant element of data (you can assume a maximum of ten elements in a graph for this), and draw starting from the bottom left of the application. You should make an attempt to separate presentation from calculations within the application, and make use of good Swing design to handle the drawing of graphs.