1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
viva [34]
3 years ago
8

Design an application for the Sublime Sandwich Shop. The user makes sandwich order choices from list boxes, and the application

displays the price. The user can choose from three main sandwich ingredients: chicken at $6. 99, beef at $7. 99, tuna at $8. 99. The user also can choose from three different bread types: white, rye, whole wheat at no change in cost
Computers and Technology
1 answer:
Arada [10]3 years ago
4 0

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 = new JComboBox<String>();

 JLabel mainList = new JLabel("Main ingredient");

 JComboBox<String> breadBox = new JComboBox<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() {

   // code here

 }

 public static void main(String[] arguments) {

   JSandwich sandframe = new JSandwich();

   sandframe.setSize(240, 200);

   sandframe.setVisible(true);

 }

 public void itemStateChanged(ItemEvent list) {

   //

 }

}

You might be interested in
Question #4
Nataliya [291]
A is your answer.............
3 0
3 years ago
How to write my name in binary code ? Rivas
wel

Your name in binary would be "01010010 01101001 01110110 01100001 01110011"

3 0
3 years ago
Read 2 more answers
Explain how communication promotes cooperation and industrial peace​
tensa zangetsu [6.8K]

Explanation:

Communication helps the management to know what the organisation wants and how it can be performed. Through effective way of communication it promotes the industrial peace and good relations. 7. ... It enables the management to take managerial decisions which depends upon the quality of communication.

4 0
3 years ago
Why do organizations create multiple databases?
igomit [66]
Just in case one database gets hacked or crashes they have another to run on
5 0
4 years ago
What are the functions of an input device​
marshall27 [118]

Answer:

To feed the computer with data/instructions

6 0
3 years ago
Read 2 more answers
Other questions:
  • In the two-level directory, if a user refers to a particular file then__________________ Select one: a. only his/her own UFD (us
    7·1 answer
  • What powerful operating system was created in 1970s that has now set the industry
    12·1 answer
  • In __________ write, the data are stored in the cache, and control returns to the caller. Select one: a. a synchronous b. a buff
    8·1 answer
  • Which of the following plug-ins was developed by microsoft and is a software development tool used to write and run internet app
    10·1 answer
  • The _________ contains approximately 200 million axons.
    13·2 answers
  • Hey yall wanna send me some just ask for my phone #
    13·1 answer
  • What is software and explain the five types of software
    5·2 answers
  • Write a program that reads integers from the user and stores them in a list. Your
    15·1 answer
  • QN, 3. Write the working principle of computer.<br>​
    8·1 answer
  • A user calls and complains that she cannot access important company files from her personal device. You confirm that Intune poli
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!