package cn.vscoder.experiment_2;

/**
 * 商品与顾客管理系统
 */

public class shop {
    public static void main(String[] args) {
        // 创建顾客
        Customer customer =
                new Customer("zhangsan",
                "18", '男',
                "12345678", true);
        // 创建商品1
        Product product1 = new Food("士力架", 3.5,
                "玛氏公司", "black", "30g",
                "2025-03-02", 30, "巧克力,花生");
        // 输出商品1
        System.out.println(product1);

        // 创建商品2
        Toy product2 = new Toy();
        product2.setProduct_name("托马斯火车");
        product2.setProduct_price(99.9);
        product2.setProduct_producer("奥迪双钻");
        product2.setProduct_color("blue");
        product2.setProduct_weight("5kg");
        product2.setModel("T100");
        product2.setMaterial("塑料");
        product2.setSecurity_level("食品级");
        // 输出商品2
        System.out.println(product2);

        // 加购
        customer.buy(product1, 20);
        customer.buy(product2, 2);
        // 输出顾客1
        System.out.println(customer);

        // 创建顾客2
        Customer customer2 =
                new Customer("lisi",
                        "20", '女',
                        "12333333333", false);
        // 加购
        customer2.buy(product2, 3);
        customer2.buy(product1, 5);

        // 输出顾客2
        System.out.println(customer2);
    }
}