This is what I came up with but im getting upwards of 70 errors. Please help!
String itemcode1, itemcode2, itemcode3, itemcode4, itemcode5;
String itemcode6, itemcode7, itemcode8, itemcode9, itemcode10;
int price1, price2, price3, price4, price5, price6;
int price7, price8, price9, price10;
char another1, another2, another3, another4, another5;
char another6, another7, another8, another9;
System.out.println("PURCHASE");
System.out.print("\n\n\n\nPlease enter the item code: ");
itemcode1 = In.getString();
System.out.print("Please enter item cost: ");
price1 = In.getInt();
System.out.println(itemcode1 + " at a price of $" + price1);
System.out.print("\n\nWould you like to make another purchase (Y/N): ");
another1 = In.getChar();
while(another1.charAt(0)=='Y'||object1.charAt(0)=='y'||object1.charAt(0)=='yes'||object1.charAt(0)=='Yes')
{System.out.print("Please enter the item code: ");
itemcode2 = In.getString();
System.out.print("Please enter item cost: ");
price2 = In.getInt();
System.out.println(itemcode1 + " at a price of $" + price1);
System.out.print("\n\nWould you like to make another purchase (Y/N): "
another2 = In.getChar();
while(another2.charAt(0)=='Y'||object1.charAt(0)=='y'||object1.charAt(0)=='yes'||object1.charAt(0)=='Yes')
{System.out.print("Please enter the item code: ");
itemcode3 = In.getString();
System.out.print("Please enter item cost: ");
price3 = In.getInt();
System.out.println(itemcode1 + " at a price of $" + price1);
System.out.print("\n\nWould you like to make another purchase (Y/N): ");
another3 = In.getChar();
while(another3.charAt(0)=='Y'||object1.charAt(0)=='y'||object1.charAt(0)=='yes'||object1.charAt(0)=='Yes')
{System.out.print("Please enter the item code: ");
itemcode4 = In.getString();
System.out.print("Please enter item cost: ");
price4 = In.getInt();
System.out.println(itemcode1 + " at a price of $" + price1);
System.out.print("\n\nWould you like to make another purchase (Y/N): ");
another4 = In.getChar();
while(another4.charAt(0)=='Y'||object1.charAt(0)=='y'||object1.charAt(0)=='yes'||object1.charAt(0)=='Yes')
{System.out.print("Please enter the item code: ");
itemcode5 = In.getString();
System.out.print("Please enter item cost: ");
price5 = In.getInt();
System.out.println(itemcode1 + " at a price of $" + price1);
System.out.print("\n\nWould you like to make another purchase (Y/N): ");
another5 = In.getChar();
while(another5.charAt(0)=='Y'||object1.charAt(0)=='y'||object1.charAt(0)=='yes'||object1.charAt(0)=='Yes')
{System.out.print("Please enter the item code: ");
itemcode6 = In.getString();
System.out.print("Please enter item cost: ");
price6 = In.getInt();
System.out.println(itemcode1 + " at a price of $" + price1);
System.out.print("\n\nWould you like to make another purchase (Y/N): ");
another6 = In.getChar();
while(another6.charAt(0)=='Y'||object1.charAt(0)=='y'||object1.charAt(0)=='yes'||object1.charAt(0)=='Yes')
{System.out.print("Please enter the item code: ");
itemcode7 = In.getString();
System.out.print("Please enter item cost: ");
price7 = In.getInt();
System.out.println(itemcode1 + " at a price of $" + price1);
System.out.print("\n\nWould you like to make another purchase (Y/N): ");
another7 = In.getChar();
while(another7.charAt(0)=='Y'||object1.charAt(0)=='y'||object1.charAt(0)=='yes'||object1.charAt(0)=='Yes')
{System.out.print("Please enter the item code: ");
itemcode8 = In.getString();
System.out.print("Please enter item cost: ");
price8 = In.getInt();
System.out.println(itemcode1 + " at a price of $" + price1);
System.out.print("\n\nWould you like to make another purchase (Y/N): ");
another8 = In.getChar();
while(another8.charAt(0)=='Y'||object1.charAt(0)=='y'||object1.charAt(0)=='yes'||object1.charAt(0)=='Yes')
{System.out.print("Please enter the item code: ");
itemcode9 = In.getString();
System.out.print("Please enter item cost: ");
price9 = In.getInt();
System.out.println(itemcode1 + " at a price of $" + price1);
System.out.print("\n\nWould you like to make another purchase (Y/N): ");
another9 = In.getChar();
while(another9.charAt(0)=='Y'||object1.charAt(0)=='y'||object1.charAt(0)=='yes'||object1.charAt(0)=='Yes')
{System.out.print("Please enter the item code: ");
itemcode10 = In.getString();
System.out.print("Please enter item cost: ");
price10 = In.getInt();
System.out.println(itemcode1 + " at a price of $" + price1);
System.out.println("\n\nThat is the maximum amount of purchases you can make at this time. ");
}
System.out.println("receipt would go here...!");
}
also, i believe this is how you send a file, you have to zip it right?
Attached File(s)
-
HonestGavs.zip (1.25K)
Number of downloads: 142

New Topic/Question
Reply



MultiQuote





|