public class DateAndPrice
extends java.lang.Object
Constructor and Description |
---|
DateAndPrice(java.lang.String date,
double price)
setting a date-and-price pair
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDate()
returns the date of purchase
|
double |
getPrice()
returns the price
|
void |
setPrice(double price)
sets the price of an item
|
public DateAndPrice(java.lang.String date, double price)
date
- the date of purchaseprice
- the price of an itempublic double getPrice()
public java.lang.String getDate()
public void setPrice(double price)
price
- the price of an item