I am trying to make a menu like this for a user
to select a wine type (riesling, chardonnay) and then from that, it shows them the variations of the column the selected. The loop is supposed to cycle at most 16 times, or until the user indicates they're done. This is just one method that I am trying to complete right now.
I wanted to know if I was heading in the right direction. I have made the main method but I wanted to know how to make the method for gathering the input(user enters 1 for riesling, 1 for dry, then it totals it) all inside of a loop.
I would really appreciate it if someone could just help me figure this out. Thank you so much.
import javax.swing.JOptionPane;
public class WineCalc{
public static void main(String[] args){
String[][]wineTypes = {
{"Riesling", "Chardonnay", "Sauvignon Blanc", "Merlot"},
{"Dry- $4.50", "Apple- $6.00", "Lime-$4.50", "Plum- $5.00"},
{"Off Dry-$4.00", "Lemon-$5.50", "Lemongrass- $6.50", "Black Cherry- $7.50"},
{"Sweet- $5.00", "Vanilla- $6.00", "Coconut- $7.00", "Chocolate- $6.00"},
};
double[][]prices = {
{4.50, 6.00, 4.50, 5.00},
{4.00, 5.50, 6.50, 7.50},
{5.00, 6.00, 7.00, 6.00},
};
int[][]counter = {
{0,0,0,0},
{0,0,0,0},
{0,0,0,0},
};
}
public static int getWineType(String wineTypes[][]){
return wineTypes[][];
}
}