首页 > 其他分享 >期末考试作品(一)

期末考试作品(一)

时间:2022-12-14 16:25:52浏览次数:49  
标签:String int price id 期末考试 作品 public unit

public class Fruit {  private String id;  private String name;  private int price;  private String unit;  private int number;  public Fruit(String id, String name, int price, String unit) {  super();  this.id = id;  this.name = name;  this.price = price;  this.unit = unit;  }  public Fruit() {  super();  }  public String getId() {  return id;  }  public void setId(String id) {  this.id = id;  }  public String getName() {  return name;  }  public void setName(String name) {  this.name = name;  }  public int getPrice() {  return price;  }  public void setPrice(int price) {  this.price = price;  }  public String getUnit() {  return unit;  }  public void setUnit(String unit) {  this.unit = unit;  }  public int getNumber() {  return number;  }  public void setNumber(int number) {  this.number = number;  }     public int getMoney(){  return price * number;  }    }

标签:String,int,price,id,期末考试,作品,public,unit
From: https://www.cnblogs.com/lmzh/p/16982447.html

相关文章