[Solved]Design Application Sublime Sandwich Shop User Makes Sandwich Order Choices List Boxes Appl Q37174111
Design an application for the Sublime Sandwich Shop. The usermakes sandwich order choices from list boxes, and the applicationdisplays the price. The user can choose from three main sandwichingredients: chicken at $6.99, beef at $7.99, tuna at $8.99. Theuser also can choose from three different bread types: white, rye,whole wheat at no change in cost.
***MUST KEEP GIVEN CODE INTACT***
JSandwich.java
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JSandwich extends JFrame implements ItemListener{
FlowLayout flow = new FlowLayout();
JLabel companyName = new JLabel(“Sublime Sandwich”);
JComboBox<String> mainBox = newJComboBox<String>();
JLabel mainList = new JLabel(“Main ingredient”);
JComboBox<String> breadBox = newJComboBox<String>();
JLabel breadList = new JLabel(“Breads”);
JTextField totPrice = new JTextField(10);
int mainNum, breadNum;
double[] mainPrices = {6.99, 7.99, 8.99};
double sumPrice = mainPrices[0];
double breadPrice = 0;
double mainPrice = mainPrices[0];
double[] breadPrices = {0, 0, 0};
String output;
public JSandwich() {
// Write your code here
}
public static void main(String[] arguments) {
JSandwich sandframe = new JSandwich();
sandframe.setSize(240, 200);
sandframe.setVisible(true);
}
@Override
public void itemStateChanged(ItemEvent list) {
// Write your code here
}
}
Expert Answer
Answer to Design an application for the Sublime Sandwich Shop. The user makes sandwich order choices from list boxes, and the appl… . . .
OR

