Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.math.BigDecimal;
- public final class CoopCard extends BonusCard {
- CoopCard(Store store, Person person) {
- }
- /**
- * Collects bonus on the specified payment amount.
- *
- * @param paymentAmount the payment amount
- * @return collected bonus
- */
- @Override
- public BigDecimal collectBonus(double paymentAmount) {
- setBonusBalance(getBonusBalance().add(BigDecimal.valueOf(0.05 * paymentAmount)));
- return BigDecimal.valueOf(0.05 * paymentAmount);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement