www.pudn.com > bookshop.zip > BookItem.java, change:2013-10-25,size:785b


package com.tarena.bean; 
//商品列表 
public class BookItem { 
	private int count;//数量 
	private Book book;// 
	private double save;//一个商品节省的金额 
	 
 
	//有参构造器 
	public BookItem(int count,Book book) 
	{ 
		this.count=count; 
		this.book=book; 
		this.save=book.getFixedprice()-book.getYDprice(); 
	} 
	 
	public double getsaveprice(){ 
		return save*count; 
	} 
	 
	public double getprice(){ 
		return book.getYDprice()*count; 
	} 
	 
	 
	public int getCount() { 
		return count; 
	} 
	public void setCount(int count) { 
		this.count = count; 
	} 
	public Book getBook() { 
		return book; 
	} 
	public void setBook(Book book) { 
		this.book = book; 
	} 
	public double getSave() { 
		return save; 
	} 
	public void setSave(double save) { 
		this.save = save; 
	} 
	 
}