I'm coding a program that will take the prices entered by a user at a store and display them back within the program, so far I've completed the entire program except the part that takes the users input within a loops and prints it out as a array.
What I need help with;
The program has parameters whether ie. Adding anything over 3000 doesn't work, add a 0 removes the last price, and a -1 ends the program.
After ending the program (using -1) I need to take the prices the user input and output it within an array, example:
Enter a price for item #5: $-1
-1 entered, calculating total owing…
OK Gary, your purchases are:
I don't know how to code an array so I take reprint the prices entered by the user within the loop, if anyone could help me I'd be greatly appreciated.
Note: This is the array I created at the beginning of my program..
ArrayList <Double> costList = new ArrayList<Double>(15);
double  priceArray = new double ;