// add surface charge public int addSurface(Desk desk) { int cost = (int)desk.surface; return(cost); }
// add cost for drawers public int addDrawers(Desk desk) { int cost = desk.drawers * 50; return(cost); }
public int calcPrice(Desk desk, int rush) { int cost = addDrawers(desk) + addRush(desk, rush) + addSurcharge(desk) + addSurface(desk); return(cost); }