Following is a simple entity bean. yenToEuro(…) and dollarToYen(…) are declared in remote interface.

Java Code:
import java.rmi.RemoteException; 
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import java.math.*;

public class ConverterBean implements SessionBean {
   public BigDecimal dollarToYen(BigDecimal dollars) {
      …
   }

   public BigDecimal yenToEuro(BigDecimal yen) {
      …
   }

   public ConverterBean() {}
   public void ejbCreate() {}
   public void ejbRemove() {}
   public void ejbActivate() {}
   public void ejbPassivate() {}
   public void setSessionContext(SessionContext sc) {}
}