All pastes #623803 Raw Edit

Someone

public java v1 · immutable
·published 2007-07-17 21:05 UTC
rendered paste body
/* * Manages Products and Pricing */public class Product {    private String productName;    private double productPrice;        /*     * Constructs the Product     * @param nameOfProduct Name of Product     * @param priceOfProduct Price of Product     */    public Product(String nameOfProduct, double priceOfProduct) {        this.productName = nameOfProduct;        this.productPrice = priceOfProduct;    }        /*     * Returns the Name of Product     * @return Name of Product     */    public String getName() {        return this.productName;    }        /*     * Returns the Price of Product     * @return Price of Product     */    public double getPrice() {        return this.productPrice;    }        /*     * Sets price of Product     * @param newPrice New Price of Product     */    public void setPrice(double newPrice) {        this.productPrice = newPrice;    }}