home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / eiffel / smalleif.97 / se.t / SmallEiffel / lib_test / animal.e next >
Encoding:
Text File  |  1996-05-02  |  699 b   |  37 lines

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. deferred class ANIMAL
  5.  
  6. feature {ANY}
  7.    
  8.    cry is
  9.       deferred
  10.       end;
  11.    
  12.    reproduction(other: ANIMAL): ANIMAL is
  13.       require
  14.      other /= Void
  15.       do
  16.      Result := other;
  17.       end;
  18.    
  19.    fornicate_with(other: QUADRUPEDE): ANIMAL is
  20.       require
  21.      other /= Void
  22.       do
  23.      Result := other;
  24.       end;
  25.    
  26.    congratulation(other: ANIMAL) is
  27.       do
  28.      Current.cry;
  29.      std_output.put_string(" + ");
  30.          other.cry;
  31.          std_output.put_string(" = ");
  32.          Current.reproduction(other).cry;
  33.          std_output.put_new_line;
  34.       end;
  35.    
  36. end -- ANIMAL
  37.