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
Brandon purchased a new processor online as an upgrade. When he purchased the processor, he made sure that it used the same sock
LenaWriter [7]

Answer:

The processor and the motherboard goes bad.

Explanation:

Computer system component upgrade allows the enhancement of the component specification. Every computer system comes with a specific quality, size or speed of its various components like the storage drives size, the memory size, the processor speed and even the software components like the operating system.

An upgrade must be compatible with the system configuration like upgrading the processor. If the upgrade is compatible, the processor speed can be increased, but when an upgrade of the processor is not compatible with the chipsets, this could damage the processor and motherboard.

3 0
4 years ago
Given a PrintWriter reference variable named output that references a PrintWriter object, write a statement that writes the stri
Nadya [2.5K]

Answer:

A PrintWriter reference variable named output that references a PrintWriter object is as follows:

//PrintWriter output = new PrintWriter(outfile);

PrintWriter output = new PrintWriter("output.txt");

The statement that writes the string "Hello World" to the file output is as follows:

//output.print(message)

output.print("Hello World");

Explanation:

4 0
4 years ago
SUWIDHA stands for .​
Anettt [7]
SUWIDHA stands for Single User-friendly Window Disposal & Help-line for Applicants.

Hope it helps
5 0
3 years ago
Which member of the Jackson family was the spokesperson for the Psychic Friends Network.​
Jlenok [28]

Answer:

La Toya Jackson

Explanation:

8 0
3 years ago
A(n) ________ is a text or image that allows the user to access that file or web page with a single click.
son4ous [18]
It would be called a link. Connection might work as well. 
5 0
3 years ago
Read 2 more answers
Other questions:
  • Which data type uses more memory an integer or an unsigned integer?
    6·1 answer
  • A prime number is a number that is only evenly divisble by itself and 1.
    12·1 answer
  • How could a system be designed to allow a choice of operating systems from which to boot? What would the bootstrap program need
    14·1 answer
  • What do computer viruses eat for snacks?
    7·2 answers
  • What advantage does digital storytelling have over oral storytelling traditions?
    6·1 answer
  • Ms. Myers commented that _____ she slept in at the hotel was better than _____ she slept in at home.
    7·1 answer
  • What permissions should you assign a group if you want the group to have the ability to read, add, delete, execute, and modify f
    12·1 answer
  • John Cleaver is the CEO of Tech World, which is a retail store that sells computers, monitors, cameras, televisions and many oth
    6·1 answer
  • What are the differences betweenCONS, LIST, and APPEND?
    5·1 answer
  • Which of these is an example of input?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!