PA1


Ask questions about this at http://pbl.cc.gatech.edu/cs2390/348.html

Programming Assignment #1: A Graphing Tool

I want a reusable tool that takes an array of values (or two) and returns a Form of a graph of the set of values. Support both LineGraphs and BarGraphs. Display them, but also return them for use later. By default, include labels on the axes for values and for positions in the list. Assume that values will be between 0 and 1 million, and that there may be as many as 100 values. Graphs should not be larger than 400 by 400 points.

Support all of the following:

LineGraph on: #(12 13 45).  "Display a line graph with these three values"

BarGraph on: #(12 13 45). "Display a bar graph with these three values"

LineGraph on: #(12 13 45) and: #(0.23 10 45 17.3). "Display a line graph with both sets of values" BarGraph on: #(1 2 3) and: #(4 5 6). "BarGraph's with two sets of values will always have the same number of elements in each set."

|f | f := BarGraph formOn: #(12 13 45). "Return a Form with the BarGraph" f display. "Display the Form"

BarGraph on: #(12 13 45) with: #('City1' 'City2' 'City3'). "Label the bar graph with these names on the horizontal axis" LineGraph on: #(12 13 45) with: #('City1' 'City2' 'City3'). "Label the line graph with these names on the horizontal axis"

Scenarios

Extra Credit If you do any of these, clearly document how the user accesses these features!

Hints, Issues, Suggestions


News Page | CS2390 Sp'98 Home Page | CS2390 CoWeb | STABLE | BOOST
Questions/comments/concerns to guzdial@cc.gatech.edu
Page last updated 4/29/98; 1:53:22 PM