📄 pricequote.java
字号:
// PriceQuote.java
// PriceQuote maintains price information for one book store.
package jws1casestudy.pricefinder.common;
public class PriceQuote {
private double price; // book price
private String isbn; // book ISBN
private int storeID; // store ID
private String storeDescription; // store description
// public default constructor
public PriceQuote() {}
// get book price
public double getPrice()
{
return price;
}
// get book ISBN
public String getIsbn()
{
return isbn;
}
// get store ID
public int getStoreID()
{
return storeID;
}
// get store description
public String getStoreDescription()
{
return storeDescription;
}
// set book price
public void setPrice( double price )
{
if ( price >= 0 )
this.price = price;
else
this.price = 0;
}
// set book ISBN
public void setIsbn( String isbn )
{
this.isbn = isbn;
}
// set book ID
public void setStoreID( int storeID )
{
this.storeID = storeID;
}
// set weather description
public void setStoreDescription( String storeDescription )
{
this.storeDescription = storeDescription;
}
} // end class PriceQuote
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -