package retail;

public class RetailHelper
{
	
	/**Returns cash string formatted X.XX for a given price in cents*/
	public static String getCashString(int amount)
	{	System.out.println(amount);
		int cents = amount % 100;
		int dollars = amount - cents;
		dollars /= 100;
		return dollars + "." + ((cents < 10 ) ? "0" : "") + cents;
	}

	/**Returns price in cents from given cash string formatted X.XX*/
	public static int getCentsFromCashString(String cashString)
	{
		String[] parts = cashString.split(".");
		return (Integer.parseInt(parts[0]) * 100) + Integer.parseInt(parts[1]);
	}
}

@@ -599,12 +599,801 @@
 %5D);%0D%0A%09%7D%0D
+%0A%0D%0A%09private static final int maxBarcodeLength = 15;%0D%0A%09private static final int maxDescriptionLength = 30;%0D%0A%09private static final int maxPriceLength = 10;%0D%0A%09%0D%0A%09/**Returns a string with barcode, price, and description with even spacing, and %22...%22 as needed*/%0D%0A%09public static String getRegisterItemString(Item item)%0D%0A%09%7B%0D%0A%09%09return forceStringLength(item.getBarcode(), maxBarcodeLength)%0D%0A%09%09%09%09+ forceStringLength(item.getDescription(), maxDescriptionLength)%0D%0A%09%09%09%09+ %22$%22 + item.getPriceString();%0D%0A%09%7D%0D%0A%09%0D%0A%09private static String forceStringLength(String string, int fitLength)%0D%0A%09%7B%0D%0A%09%09if (string.length() %3E fitLength - 1)%0D%0A%09%09%7B%0D%0A%09%09%09string = string.substring(0, fitLength - 4);%0D%0A%09%09%09string += %22...%22;%0D%0A%09%09%7D%0D%0A%09%09%0D%0A%09%09while (string.length() %3C fitLength)%0D%0A%09%09%7B%0D%0A%09%09%09string += %22 %22;%0D%0A%09%09%7D%0D%0A%09%09%0D%0A%09%09return string;%0D%0A%09%7D%0D
 %0A%7D%0D%0A

Add getRegisterItemString to RetailHelper