//************************************************************************//
//                                                                       *//
// 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()
#include <string.h>              // string function

const int len = 20;

// game abstract data type definition class game


class sport

{

protected:
public:

  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

public:

  sport();                                           // constructor of the class game
  virtual void SetName(char * teamName) = 0;         // display function
  virtual void display() = 0;                        // display function
  virtual void show_stats() = 0;                     // show stats function
  virtual void play_game() = 0;                      // show play a game function
  virtual void city() = 0;                           // the name of the team city
};


class baseball:public sport

{
private:
public:

  double home_runs;               // number of home run
  double rbis;                    // number of rbis
  double per;                     // average number of home_run
							      // per game
  double per1;                    // average number of rbis per game
  double errors;                  // percentage of games that have won for
								  // the current season.


public:

  baseball();                                   // constructor of the class baseball
  baseball(char * teamName) ;                   // display function
  virtual void SetName(char * teamName);        // display function
  virtual void display();                       // display function
  virtual void show_stats();                    // show stats function
  virtual void play_game();                     // show play a game function
  virtual void city();                          // the city of the team
  ~baseball(){}                                 // destructor of the class baseball

};

class football:public sport

{
private:
public:

  double interceptions;               // number of interceptions in the game
  double touchdowns;                  // number of touchdowns in the game
  double per;                         // average the number of touchdowns
  double per1;                        // average the number of interceptions

public:

  football();                              // constructor of the class football
  football(char * teamName) ;              // display function
  virtual void SetName(char * teamName);   // display function
  virtual void display();                  // display function
  virtual void show_stats();               // show stats function
  virtual void play_game();                // show play a game function
  virtual void city();                     // the city of the team
  ~football(){};                           // destructor of the class football

};


