Commit 5b70b385 authored by ethan's avatar ethan

File upload

parent 5e69f3ef
......@@ -54,7 +54,7 @@ Start
----------------------------------------------------------------------------------------------------
Errors/things that still need finishing:
- after initial run - menu and seating array runs multiple times - loops itself?
- after initial run/loop the menu and seating run multiple times
- make code choose next available seat if option is chosen
- remove items method doesnt remove items
- make it empty basket after purchase
......@@ -261,6 +261,7 @@ public class bookingSystem {
itemPrice.add((float) 2.00);
itemQty.add(20);
System.out.println( "Code \t: Name \t\t: Price \t: Qty" );
for( int i=0; i< itemName.size(); i++ ) {
......@@ -290,6 +291,9 @@ public class bookingSystem {
break;
}
else {
//Converts from item code to the position of it in the array
tempItemCode = tempItemCode - 1;
//Asks for quantity
System.out.println("How many would you like to order?");
tempItemQty = input.nextInt();
......@@ -428,7 +432,7 @@ public class bookingSystem {
//Adds input items to the basket
private static void addItem(int tempItemCode, int tempItemQty) {
basketCode.add(tempItemCode);
basketCode.add(tempItemCode + 1);
basketName.add(itemName.get(tempItemCode));
basketQty.add(tempItemQty);
basketPrice.add(tempItemQty * itemPrice.get(tempItemCode));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment