mirror of
https://github.com/Dichgrem/Java.git
synced 2025-12-17 04:51:58 -05:00
update:demo4
This commit is contained in:
9
com/study/demo4/CreditCardPayment.java
Normal file
9
com/study/demo4/CreditCardPayment.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package com.study.demo4;
|
||||
|
||||
class CreditCardPayment implements PaymentProcessor {
|
||||
@Override
|
||||
public boolean pay(double amount) {
|
||||
System.out.println("银行卡支付: " + amount);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user