Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import java.math.BigDecimal;
  2.  
  3. public final class CoopCard extends BonusCard {
  4. CoopCard(Store store, Person person) {
  5.  
  6. }
  7.  
  8. /**
  9. * Collects bonus on the specified payment amount.
  10. *
  11. * @param paymentAmount the payment amount
  12. * @return collected bonus
  13. */
  14. @Override
  15. public BigDecimal collectBonus(double paymentAmount) {
  16. setBonusBalance(getBonusBalance().add(BigDecimal.valueOf(0.05 * paymentAmount)));
  17. return BigDecimal.valueOf(0.05 * paymentAmount);
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement