public class ShoppingService implements ShoppingServiceInter {
public void shopping(Customer cus, Market market, Product product) {
System.out.println("" + cus.getName() + "在" + market.getName() + "买了" + product.getName() + "");
}
}
public class Client {
public static void main(String[] args) {
Customer tom = new Customer("Tom");
Market ous = new Market("欧尚");
Product tsh = new Product("T恤");
ShoppingServiceInter service = new ShoppingService();
service.shopping(tom, ous, tsh);
}
}