Class AbstractVoucherCreator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract AbstractVoucher createVoucher​(java.lang.String firstName, java.lang.String lastName, double value)
      Central method in this FACTORY METHOD example.
      Concrete voucher creators return a new voucher using the given arguments and their special data/logic.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createVoucher

        public abstract AbstractVoucher createVoucher​(java.lang.String firstName,
                                                      java.lang.String lastName,
                                                      double value)
        Central method in this FACTORY METHOD example.
        Concrete voucher creators return a new voucher using the given arguments and their special data/logic.
        Parameters:
        firstName - first name of the voucher owner
        lastName - last name of the voucher owner
        value - voucher's value
        Returns:
        new concrete voucher