/////////////////////////////////////////////////////////////////////
// CS177/477, Fall 1999                                            //
// Using multiple objects and function parameters                  //
// Roger Hartley                                                   //
/////////////////////////////////////////////////////////////////////

#include <iostream>
// uncomment the line below if you want to use the string class
//#include <string>
using namespace std;

class Counter {
public:
  // declare a default constructor function here
  // declare a function that increments the counter here
  // declare a function to print the value of the counter here
  // declare a function here to test whether the counter has exceeded
  // some value passed as an argument
private:
  int count; // the counter variable
};

int main() {
  const int MAX_LINES = 5;  // the threshold for lines
  const int MAX_CHARS = 50; // the threshold for characters
  // create two counter objects here, one for lines and one for
  // characters -- use different names for the objects!
  char c; // a variable to hold the characters read one at a time
          // from the keyboard

  cin.get(c); // read one character from the keyboard
  while (!cin.eof()) {  // continue as long as there are more characters
    // here you should test for newline, and process accordingly,
    // here you should test for too many lines and characters, and exit
    // if too many
    // don't forget to increment the counts in the counter objects!
    cin.get(c); // get another character from the keyboard
  }
  // report on the number of characters and lines
}


