How do you go about creating a piechart that will read a data file that contains a title and a series of numbers, and plots this as as a coloured pie chart in a window. The data file should consist of a single line of text containing the label for the chart. Each subsequent line should consist of a numeric data point (which may be either an integer or a floating point value), and there may be any number of data points. The program should create a window, write the label of the chart into that window and draw the pie chart. Each segment of the pie chart should be a different colour. Two sample data files together with the output produced is shown below. First Data Set 14 12 37 62 The second data set 0.3 0.2 0.07 0.07 0.09 0.5 0.3 also the following will also be needed 1. Add a set of menus to the program window, and allow it to read the data file by selecting a �File/Open� menu command. 2. Add labels for the segments to the data file, and draw theses on the chart on top of (or next to) pie segments.
I think a I/O class is required for the data reading, but i dont know how to implement this