/* * @(#)Cow.java * * Summary: Demonstrate a simple Interface. * * Copyright: (c) 2009 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.6+ * * Created with: IntelliJ IDEA IDE. * * Version History: * 1.0 2009-04-11 - initial version */ package com.mindprod.example; /** * Demonstrate a simple Interface. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2009-04-11 - initial version * @since 2009-04-11 */ public interface Cow { // -------------------------- PUBLIC INSTANCE METHODS -------------------------- /** * Name of the breed * * @return Short string describing the breed. */ String breedName(); /** * percentage butterfat of the milk * * @return percentage */ double butterfat(); /** * Typical milk production of this breed. * * @return daily milk production in litres */ double milkProduction(); // above three methods are implicitly public and abstract because they are defined in an interface. }