//************************************************************************
//
// Name: Huy Nguyen
// Date:  6/5/1999
// Project: Classes and inheritance
// File name : game.h
// Description: This is the header file for the program, that declare all
//              the neccessary global variables, library file, and all
//              data members, and function members in the class game.
//
//************************************************************************

#include <iostream.h>            // for terminal input/output
#include <iomanip.h>             // for input/output manipulation
#include <stdlib.h>              // for exit()

const int len = 20;

// game abstract data type definition class game


class football

{

private:

  char name[len];                // name of the football team
  int winning;                   // number of winning game
  int lose;                      // number of lose
  double winpercent;             // percents of winning game
  double total;                  // number of game play
  double interceptions;          // number of interceptions in the game
  double touchdowns;             // number of touchdowns in the game
  double per;                    // average the number of touchdowns
											// per game
  double per1;                   // average the number of interceptions
											// per game


public:

  football();                    // constructor of the class game
  void display();                               // display function
  void show_stats(double per, double per1);     // show stats function
  void play_game();                             // play a game function

};


class baseball:public football

{
private:

  char name3[len];                // name of the baseball team
  int winning1;                   // number of winning game
  int lose1;                      // number of lose
  double winpercent1;              // percents of winning game
  double total1;                  // total of baseball games
  double home_runs;               // number of home run
  double rbis;                    // number of rbis
  double per2;                    // average number of home_run
											 // per game
  double per3;                    // average number of rbis per game
  double errors;                  // percentage of games that have won for
											 // the current season.


public:

  baseball();                     // constructor of the class game
  void display1();                              // display function
  void show_stats1(double error);               // show stats function
  void play_game1();                            // show play a game function

};
