Create a Java program for a coffee shop inventory system. Fill in the blanks to declare the main class, method, and parameter correctly. The program should display the shop's name, number of coffee types, average price, and whether it's open.
Types and variables
Brewing up a digital bean counter
Report a typo
Fill in the gaps with the relevant elements
CoffeeShopInventory {
public main([] args) {
String shopName = "Java Beans";
int coffeeTypes = 5;
double averagePrice = 3.99;
boolean isOpen = true;
System.out.printf("Shop: %s\nCoffee Types: %d\nAverage Price: $%.2f\nOpen: %b\n", shopName, coffeeTypes, averagePrice, isOpen);
}
} ___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.