/test/language/unclassified/animal.e

http://github.com/tybor/Liberty · Specman e · 57 lines · 30 code · 6 blank · 21 comment · 0 complexity · c2fbfcfa63342127a670fe61d32b53e5 MD5 · raw file

  1. -- This file is part of SmartEiffel The GNU Eiffel Compiler Tools and Libraries.
  2. -- See the Copyright notice at the end of this file.
  3. --
  4. deferred class ANIMAL
  5. feature {ANY}
  6. cry
  7. deferred
  8. end
  9. reproduction (other: ANIMAL): ANIMAL
  10. require
  11. other /= Void
  12. do
  13. Result := other
  14. end
  15. fornicate_with (other: ANIMAL): ANIMAL
  16. require
  17. other /= Void
  18. do
  19. Result := other
  20. end
  21. congratulation (other: ANIMAL)
  22. do
  23. Current.cry
  24. std_output.put_string(" + ")
  25. other.cry
  26. std_output.put_string(" = ")
  27. Current.reproduction(other).cry
  28. std_output.put_new_line
  29. end
  30. is_cat, is_dog: BOOLEAN
  31. do
  32. end
  33. end -- class ANIMAL
  34. --
  35. -- ------------------------------------------------------------------------------------------------------------------------------
  36. -- Copyright notice below. Please read.
  37. --
  38. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  39. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  40. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  41. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  42. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  43. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  44. --
  45. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  46. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  47. --
  48. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  49. --
  50. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  51. -- ------------------------------------------------------------------------------------------------------------------------------