CS130

MP6

Got Eggs?


The Problem

In MP5 you wrote a program to generate some statistics on a file containing egg weights. In this exercise you will expand what you did in MP5 to include a pie chart and bar charts as well as egg statistics.

Layout

The general layout of your program should follow the interface shown below. The user should be allowed to specify the file for analysis by using the DriveListBox, DirectoryListBox and the FileListBoxes. The analysis to be selected should use a combo box (dropdown list). The analysis will be performed when the user click on the "Do the Analysis" button.

Analyses

If the user selects the statistics option, the program will read in the data file and generate the following statistics when the "Do The Analysis" button is pressed.:

If the user selects the bar chart option, the program should read in the egg weights and generate a bar chart similar to the one shown below when the "Do The Analysis" button is pressed:

If the user selects the pie chart option, the program should read in the egg weights and generate a pie chart simular to the one shown below when the "Do The Analysis" button is pressed:

Notes

  1. The data files that your program will be tested with may contain between 20 and 500 weight values.
  2. Your charts need not duplicate exactly the format shown above. However they must contain the information in an "understandable" format.

A sample input data file is available here.

What You'll Turn In:

  1. a printout of your code
  2. a diskette containing your code (be sure and include the sample egg weight file as well), clearly labled with:

Name your project mp6.prj.


* this exercise inspired by this. See this for additional information on eggs.