10.5.                                            293

10.5.   

     ,    -
 .     .
       .
      ,       -
  .  C++       
(pure virtual function).       ,
   .      :

virtual _ = 0;

     ,    -
 .        (deferred
method).

,       ,  -
  (abstract class). ,       
 .         -
 ,        . -
      ,     
,    .

  ,     . -
         -
 Simula 67.       
   .

        . -
    1 iving ().    -
   .        -
 ,    .    .

  predator.cpp

// -    living

const int N = 40; //  

// : , , , 
//STATES     (  4)

enum state { EMPTY , GRASS , RABBIT , FOX, STATES };

const int DRAB = 3, DFOX = 6, CYCLES = 5;

class living;                  // 
typedef living* world[N][N];   //

class living {                //   

public:

virtual state who() = 0;   //  (?)
virtual living* next (world w) =0;   // ?

protected:

int row, column;           // 