Product - } public double getPrice() { return price; }...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
public class Product { private String brand; private String type; private double price; public Product() { brand = ""; type = ""; price = 0.0; } public Product(String brand, String type, double price) { this.brand=brand; this.type = type; this.price = price; } public String getBrand() { return brand; } public void setBrand(String brand) { this.brand= brand; } public String getType () { return type; } public void setType(String type) { this.type = type;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } public double getPrice() { return price; } public void setPrice( double price) { this.price = price; } public boolean isEqual( Product p) { if (p.getBrand().equals(this.brand) && p.getType().equals(this.type) && p.getPrice==this.price) return true; else return false; } public void printInfo() { System.out.println(getbrand+"\t"+getType+"\t"+getPrice"."); } }...
View Full Document

This note was uploaded on 02/06/2010 for the course CSE CIS3023 taught by Professor Seema during the Spring '10 term at Florida College.

Page1 / 2

Product - } public double getPrice() { return price; }...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online