Advertisement

Java实现商品上架、删除和查看

阅读量:

设定food类

复制代码
 public class food

    
 {
    
     //菜品类
    
     private String name;
    
     private String sci;
    
     private double price;
    
     public  food(){  }
    
     public food(String name, String sci, double price) {
    
     this.name = name;
    
     this.sci = sci;
    
     this.price = price;
    
     }
    
  
    
     public void setName(String name) {
    
     this.name = name;
    
     }
    
  
    
     public void setSci(String sci) {
    
     this.sci = sci;
    
     }
    
  
    
     public void setPrice(double price) {
    
     this.price = pr

全部评论 (0)

还没有任何评论哟~