Class Product

java.lang.Object
  extended by Product

public class Product
extends java.lang.Object

Models a Product that can increase and decrease in price


Constructor Summary
Product(double thePrice, java.lang.String theDescription)
          Constructs a Product with a price and a description
 
Method Summary
 java.lang.String getDescription()
          Gets the description
 double getPrice()
          Gets the price
 void increasePrice(double percent)
          Increases the price by the given percent
 void reducePrice(double percent)
          Reduces the price of this product by the give percentage
 
Methods inherited from class
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Product

public Product(double thePrice,
               java.lang.String theDescription)
Constructs a Product with a price and a description

Parameters:
thePrice - the price of this Product
theDescription - - the description of this product
Method Detail

getDescription

public java.lang.String getDescription()
Gets the description

Returns:
the description of the Product object

getPrice

public double getPrice()
Gets the price

Returns:
the price of this Ptoduct object

increasePrice

public void increasePrice(double percent)
Increases the price by the given percent

Parameters:
percent - the percent to increase the price by

reducePrice

public void reducePrice(double percent)
Reduces the price of this product by the give percentage

Parameters:
percent - the percentage to reduce the priice by