cs235MasseyA6
DataVisualiser
 All Classes Files Functions
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ChartData Class Reference
Collaboration diagram for ChartData:
Collaboration graph
[legend]

Public Member Functions

String GetColumn (int column)
 Accessor for m_Columns - column data. More...
 
boolean SetColumns (ArrayList< String > columns)
 Mutator for m_Columns - column data. More...
 
String Get (int row, int column)
 Accessor for row column specific data. More...
 
 ChartData ()
 Basic constructor. More...
 
 ChartData (String[] titles, String[][] data)
 Constructor from 2 arrays. More...
 
int Height ()
 Calculates height of data - number of rows. More...
 
int Width ()
 Calculates width of data = number of columns. More...
 
boolean Add (int column, String value)
 Adds a value to end of specified column. More...
 
boolean AddColumn (String title)
 Adds a new column to the end of the column list. More...
 
String toString ()
 Converts data into a string to be printed to screen. More...
 

Static Public Member Functions

static void main (String[] args)
 Unit test. More...
 

Protected Attributes

ArrayList< ArrayList< String > > m_Data
 
ArrayList< String > m_Columns
 
final boolean m_Error = true
 

Constructor & Destructor Documentation

ChartData.ChartData ( )

Basic constructor.

Returns
- new empty ChartData

Here is the call graph for this function:

ChartData.ChartData ( String[]  titles,
String  data[][] 
)

Constructor from 2 arrays.

Parameters
titles- array of Strings storing column titles
data- array of Strings storing row column specific data
Returns
- new ChartData storing specified data

Here is the call graph for this function:

Member Function Documentation

boolean ChartData.Add ( int  column,
String  value 
)

Adds a value to end of specified column.

Parameters
column- the column number to add data to
value- the data to add
Returns
- success

Here is the call graph for this function:

boolean ChartData.AddColumn ( String  title)

Adds a new column to the end of the column list.

Parameters
title- title of the new column to be added
Returns
- success
String ChartData.Get ( int  row,
int  column 
)

Accessor for row column specific data.

Parameters
column- the column number to retreive data from
row- the row number to retreive data from
Returns
- value stored at [row][column]; null for failure

Here is the call graph for this function:

String ChartData.GetColumn ( int  column)

Accessor for m_Columns - column data.

Parameters
column- the column number to retreive data from
Returns
- title of the specified column; null for failure
int ChartData.Height ( )

Calculates height of data - number of rows.

Returns
- height of data
static void ChartData.main ( String[]  args)
static

Unit test.

Parameters
args- command line arguments; not used

Here is the call graph for this function:

boolean ChartData.SetColumns ( ArrayList< String >  columns)

Mutator for m_Columns - column data.

Parameters
columns- string arraylist containing column names
Returns
- success
String ChartData.toString ( )

Converts data into a string to be printed to screen.

Returns
- string representation of ChartData

Here is the call graph for this function:

int ChartData.Width ( )

Calculates width of data = number of columns.

Returns
- width of data

The documentation for this class was generated from the following file: