mirror of
https://github.com/nasa/trick.git
synced 2024-12-20 21:53:10 +00:00
14a75508a3
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.
38 lines
703 B
C++
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
|