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
laiz [17]
2 years ago
14

The owner of a candle shop has asked for your help. The shop sells three types of candles as shown below:

Computers and Technology
1 answer:
Keith_Richards [23]2 years ago
3 0

Answer:

import java.util.Scanner;

public class Main {

 public static void main(String[] args) {

   double total = 0;

   double fPrice, sPrice, tPrice;

   int firstN = 0, secdN = 0, thirdN = 0, fTime, sTime, tTime;

   int totalT = 0;

   isEnd = "n";

   for (;;){

       if (isEnd == "y"){

           break;

       }

       Scanner in = new Scanner(System.in);

       int option = in.nextInt();

       switch (option){

         case 1:

             fPrice = 2.50;

             fTime = 5;

             System.out.print("Enter number of items: ");

             firstN += in.nextInt();

             totalT += fTime * firstN;

             total += fPrice * firstN;

             break,

         case 2:

             sPrice = 3.75;

             sTime = 7;

             System.out.print("Enter number of items: ");

             secdN += in.nextInt();

             totalT += sTime * secdN;

             total += sPrice * secdN;

             break,

         case 3:

             tPrice = 5.99;

             tTime = 12;

             System.out.print("Enter number of items: ");

             thirdN += in.nextInt();

             totalT += tTime * thirdN ;

             total += tPrice * thirdN;

             break,

        default:

             System.out.println("Looking forward to the Weekend");

       }

       System.out.print("Do you want to end the order? y/n: ");

       isEnd = in.nextLine();

   }

   System.out.println("Number of Type 1 candles bought : "+firstN);

   System.out.println("Number of Type 2 candles bought : "+secdN);

   System.out.println("Number of Type 3 candles bought : "+thirdN);

   System.out.println("Total cost is : "+total);

   System.out.println("Total burn time is : "+totalT);

   double costPerBurn = (totatT * 60) / total;

   System.out.println("Cost per minute : "+ costPerBurn);

 }

}

Explanation:

The Java program creates a continuous for-loop statement that gets the candle type, price and amount ordered from a switch and accumulates the total cost and burn time of the candles bought and the cost per minute burn of the candles consecutively.

You might be interested in
Which type of graph or chart will you use to show changes in data points?
likoan [24]
You would use a line graph because, line graphs show you the slope. The slope represents a change in data.
6 0
3 years ago
Which group of commands all appear on the Standard toolbar?
topjm [15]
I hope this helps

print 
copy 
past 
send 

7 0
3 years ago
Recall that the name of a transport-layer packet is segment and that the name of a link-layer packet is frame. What is the name
AlladinOne [14]

Answer:

A network-layer packet is a data gram. A router forwards a packet based on the packet's IP (layer 3) address. A link-layer switch forwards a packet based on the packet's MAC (layer 2) address.

Explanation:

When the end system receives the unstructured bit stream from the physical wire, each layer removes the header information applicable to it until the application receives the data.

1. An application, such as an email program, creates data that will be sent by an end user, such as an email message. The Application layer places a header (encapsulation) field that contains information such as screen size and fonts, and passes the data to the Presentation layer.

2. The Presentation layer places layer 6 header information. For example, the text in the message might be converted to ASCII. The Presentation layer will then pass the new data to the Session layer (layer 5).

3. The Session layer follows the same process by adding layer 5 header information, such as information that the Session layer will manage the data flow, and passes this data to the Transport layer (layer 4).

4. The Transport layer places layer 4 information, such as an acknowledgement that the segment was received in the header, and passes it to the Network layer (layer 3).

5. The Network layer places layer 3 header information, such as the source and destination address so the Network layer can determine the best delivery path for the packets, and passes this data to the Data Link layer (layer 2).

6. The Data Link layer places layer 2 header and trailer information, such as a Frame Check Sequence (FCS) to ensure that the information is not corrupt, and passes this new data to the Physical layer (layer 1) for transmission across the media.

7. The bit stream is then transmitted as ones and zeros on the Physical layer. It is at this point that the Physical layer ensures bit synchronisation. Bit synchronisation will ensure the end user data is assembled in the correct order it was sent.

8. Steps 1 through 7 occur in reverse order on the destination device. Device B collects the raw bits from the physical wire and passes them up the

Data Link layer. The Data Link layer removes the headers and trailers and passes the remaining information to the Network layer and so forth until data is received by the Application layer. Eventually, Device B will receive an email notification displaying a message to indicate that a new email message has been received.

5 0
3 years ago
Question 1 of 19
shusha [124]

Answer:

UI Character Presets

Explanation:

User Interface is an option or go-to menu in a desktop application. For example, Photoshop. It allows a user to tweak the outlook to his or her own preference rather than the default settings.

To do this, a user is often tasked to do the following:

1. Click on the "Edit" menu

2. Navigate and click on "Preferences"

3. Select the "Interface" link

The options available to change includes:

a. UI Scaling

b. UI Font Size

c. UI Language.

Hence, in this case, the element that is not a selection in the Interface preferences is "UI Character preset"

7 0
3 years ago
Name at least three real-life objects that are instances of each of the following classes:
DENIUS [597]

The three real-life objects that are instances of each of the following classes are given below:

a.<u> Song:</u>

The song Believe in yourself is an instance of song class

The song Where do broken hearts go is an instance of song class.

The song Ambition is an instance of song class

b. <u>CollegeCourse</u>

The College course Engineering is an instance of College course class

The College course Accounting is an instance of College course class

The College course Medicine is an instance of College course class

c. <u>Musician:</u>

The musician Rihanna is an instance of musician class.

The musician Sean Paul is an instance of musician class.

The musician Wyclef is an instance of musician class.

Real-life objects refer to the things that are characterized together as they share common qualities. The assignment simply wants you to name examples under the categories given.

Read related link on:

brainly.com/question/16699733

7 0
2 years ago
Other questions:
  • What are some useful properties of current electricity
    13·2 answers
  • which of the following is involved in ordering an outline. A.grouping B.merging C.organizing D.arranging
    10·1 answer
  • Will an email sent from a phone say it was sent from your phone
    5·2 answers
  • How should you set the OHMS ADJust control on a multitester of analog VOM, for resistance measurements?
    12·1 answer
  • A ______ is a computer that controls access to the hardware, software, and other resources on a network. mainframe server workst
    10·1 answer
  • How to program a game​
    7·2 answers
  • python. create a program that asks the user to input their first name and their favorite number. Then the program should output
    12·1 answer
  • Class.object.method is an example of using the ______<br> to access the elements of a class.
    9·1 answer
  • A security operation center (SOC) analyst investigates the propagation of a memory-resident virus across the network and notices
    15·1 answer
  • You work part-time at a computer repair store. You're building a new computer. The customer has requested two serial ATA (SATA)
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!