public function __toString()
{
$rightCols = 10;
$leftCols = 38;
if ($this->dollarSign) {
$leftCols = $leftCols / 2 - $rightCols / 2;
}
$left = str_pad($this->name, $leftCols);
$sign = $this->dollarSign ? '$ ' : '';
$right = str_pad($sign . $this->price, $rightCols, ' ', STR_PAD_LEFT);
return "{$left}{$right}\n";
}