Initial commit

This commit is contained in:
2025-11-06 10:29:13 +08:00
commit 0becd14830
318 changed files with 7145 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package com.p14;
public class Test {
public static void main(String[] args) {
//开卡
BusCard card=new BusCard();
//充值
card.charge(2);
//查询余额
System.out.println("余额:"+card.queryBalance());
//刷卡
try {
card.swipe(5);
System.out.println("刷卡成功!您的余额:"+card.queryBalance());
} catch (CardException e) {
System.out.println(e.getMessage());
}
}
}