public void modifyFurniture(int id, int price, String name, String color) { Furniture temp = (Furniture) furnitures.get(id); temp.setPrice(price); temp.setName(name); temp.setColor(color); furnitures.set(id, temp); }
public String printFurniture() { String result = "Furnitures\nid\t\tprice\t\tname\t\tcolor\n"; for (int i = 0; i < furnitures.size(); i++) { Furniture temp = (Furniture) furnitures.get(i); result = result + i + "\t\t" + temp.getPrice() + "\t\t" + temp.getName() + "\t\t" + temp.getColor() + "\n"; } return result; }