I don't know a lot about java if yous can could you keep your replies simple to understand.
I am making a simple checkout program. The program will let the user input the amount items they bought & calculate the total bill.
The way I am going about this is I will print a item to the screen and the the user inputs the amount of that item they bought and then the program will move onto the next item in the array. This is my code so far
class Checkout{
public static void main(String args[]){
String items[] = {
"Milk", "Bread", "Butter", "Cheese", "Orange Juice", "Sugger","Potatoes", "Sausages","Cabbage","Noodles"};
int price;
for (String str : items) {
System.out.println(str);
}
}
}
I have no clue on how to print the array one at a time. I would also like to get the user to input the amount they bought.
I hope you guys understand what I am saying, Thanks