创建模板类(封装一个类) 例1:新建一个名字叫做 Product 的类 Product.swift File 的内容 class Product { var name: String var description: String var price: Double var stock: Int init(name: String, description: String, price: Double, stock: Int) { self.name = name self.descriptio…