BarChart - /* BarChart Class * Anderson, Franceschi */...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
/* BarChart Class * Anderson, Franceschi */ import java.awt.Graphics; import javax.swing.JFrame; import java.awt.Color; i public class BarChart { public static int XMAX = 400; public static int YMAX = 250; private int [] data; private int barSize; private int xStart; private int activity = 4; private int studentResult; private int exactFrequencyCount; private int exactMinimum; private int key; private boolean checkNewValues; public BarChart( int [] dArray ) { data = new int [dArray.length]; for ( int i = 0; i < dArray.length; i++ ) { data[i] = dArray[i]; } barSize = ( XMAX - 20 ) / data.length; studentResult = -1; exactFrequencyCount = -1; exactMinimum = -1; key = -1; checkNewValues = true; } public void setArray( int [] dArray ) { for ( int i = 0; i < dArray.length; i++ ) { data[i] = dArray[i]; } } public void setStudentResult( int newStudentResult ) { studentResult = newStudentResult; } public void setKey( int newKey ) { key = newKey; } public int getExactFrequencyCount( ) { return exactFrequencyCount; }
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
public int getExactMinimum( ) { return exactMinimum; } public void setActivity( int a ) { activity = a; } public int getActivity( ) { return activity; } public boolean getCheckNewValues( )
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/10/2009 for the course CS 102 taught by Professor Kanipiakins during the Spring '09 term at University of Maryland Baltimore.

Page1 / 5

BarChart - /* BarChart Class * Anderson, Franceschi */...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online