cartbean.java

来自「JSP+Mysql的网上订餐,用户有增删改除等功能,订单模块」· Java 代码 · 共 78 行

JAVA
78
字号
package com.yy.bean;

import java.io.Serializable;

public class CartBean implements Serializable{
	private int id;
	private String foodname;
	private FoodBean food;
	private int count;
	private double foodprice;
	private int fid;
	private String oId;
	public int getFid() {
		return fid;
	}
	public void setFid(int fid) {
		this.fid = fid;
	}
	public String getOId() {
		return oId;
	}
	public void setOId(String id) {
		oId = id;
	}
	public double getLitprice() {
		return litprice;
	}
	public void setLitprice(double litprice) {
		this.litprice = litprice;
	}
	public double getFoodprice() {
		return foodprice;
	}
	public void setFoodprice(double foodprice) {
		this.foodprice = foodprice;
	}
	public CartBean(){}
	public CartBean (FoodBean foodToadd, int num){
		food=foodToadd;
		count=num;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	public String getFoodname() {
		return foodname;
	}
	public void setFoodname(String foodname) {
		this.foodname = foodname;
	}
	public FoodBean getFood() {
		return food;
	}
	public void setFood(FoodBean food) {
		this.food = food;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	
	double litprice;
	 public double littleprice()
	{
		litprice=foodprice*count;
	    return litprice;
	}



}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?