mirror of
https://github.com/nasa/trick.git
synced 2024-12-22 22:42:26 +00:00
0c84b8ad08
Moved SIM_events, test_dp, test_dr, and abstract. refs #191
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
|