Professional Documents
Culture Documents
Flowchart:
Source code:
Import java.util.ArrayList;
Import java.util.Scanner;
Class GroceryItem {
Private String name;
Private double price;
Private int quantity;
Public Groceryshop() {
Items = new ArrayList<>();
}
Shop.displayItems();
System.out.println(“Total revenue: $” + shop.calculateTotalRevenue());
Scanner.close();
}
}
Test: