trick/trick_models/abstract_test/ball.hh
Alex Lin 14a75508a3 Cleaning up once include variables and copyright cleanup.
Changed all header file once include variables to follow the same naming
convention and not start with any underscores.  Also deleted old
incorrect copyright notices.  Also removed $Id: tags from all files.

Fixes #14.  Fixes #22.
2015-03-23 16:03:14 -05:00

38 lines
703 B
C++

/**
@file
@verbatim
PURPOSE:
( Test abstract class pointers )
@endverbatim
*******************************************************************************/
#ifndef BALL_HH
#define BALL_HH
#include <iostream>
#include <stdio.h>
class Ball {
public:
virtual ~Ball() {} ;
virtual void print_type() = 0 ;
} ;
class Baseball : public Ball {
public:
Baseball() {} ;
~Baseball() {} ;
virtual void print_type() { std::cout << "baseball" << std::endl ; } ;
} ;
class Soccerball : public Ball {
public:
Soccerball() {} ;
~Soccerball() {} ;
virtual void print_type() { std::cout << "soccer ball" << std::endl ; } ;
} ;
#endif