Example

Example

int count; double total; ... count++; total += datum;

Collector c(size); ... c->newDataPoint(datum);

Key to convenience is simple initialization. OOP does the rest.

Previous slide Next slide Back to the first slide View Graphic Version