Item - return name; } public double getPrice() { return...

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

View Full Document Right Arrow Icon
//DO NOT CHANGE THIS FILE public class Item { private int ID; private Manufacturer manufacturer; private String name; private double price; private double cost; private int stock = 0; private int numSold = 0; public Item(int ID, String name, Manufacturer manu, double price, double cost){ this.ID = ID; this.name = name; this.manufacturer = manu; this.price = price; this.cost = cost; } public int getID() { return ID; } public Manufacturer getManufacturer() { return manufacturer; } public String getName() {
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: return name; } public double getPrice() { return price; } public double getCost() { return cost; } public int getStock() { return stock; } public void setStock(int stock) { this.stock = stock; } public int getNumSold() { return numSold; } public void setNumSold(int numSold) { this.numSold = numSold; } public String toString(){ return String.format("%d,%s,%s,%f,%f,%d,%d", ID,name,manufacturer.getName(),cost,price,stock,numSold); } }...
View Full Document

Page1 / 2

Item - return name; } public double getPrice() { return...

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