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]
3 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]3 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
When reading words with a scanner object, a word is defined as ____?
nata0808 [166]
In Java, it would be String object.
6 0
3 years ago
When shopping on the web, it is better to pay for your purchase with a debit card rather than a credit card.
vaieri [72.5K]
Correct, debit cards use money you already have. Credit cards basically 'loan' money, which can lead to debt if you overuse it or fail to pay it off
8 0
3 years ago
Read 2 more answers
Need help ASAP.<br> I am so lost.
Savatey [412]

Answer: china

Explanation:

6 0
3 years ago
What is activated as necessary to support local eocs and to ensure that responders have the resources they need to conduct respo
gizmo_the_mogwai [7]

Answer: Emergency Operation Center (EOC)

Explanation:

An Emergency Operation Center is the coordination base for emergency service in case there is any within a state or a state Connecticut. The major purpose of the emergency center is to be in charge of controlling deploying and utilizing facilities needed to prepare for any form of emergency, disaster management, etc.

To run an effective Emergency Operation Center, focus must be on the facilities, equipments and personnel involved.

3 0
3 years ago
When delivering 2023 murano, demonstrate how to turn the driver assistance technologies on or off using ________.
IgorC [24]

In the case above, it is by using

  • The Driving Aids screen that is shown in the Advanced Drive-Assist Display
  • The Driver Assistance menu  seen under Settings in the Advanced Drive-Assist Display.

<h3>What are the packages is added for Murano?</h3>

Murano is known to adds a lot of feature such as new Midnight Edition package, and blackout front grille, amidst others.

Note that In the case above, it is by using

  • The Driving Aids screen that is shown in the Advanced Drive-Assist Display
  • The Driver Assistance menu  seen under Settings in the Advanced Drive-Assist Display.

Learn more about Cars from

brainly.com/question/124419

#SPJ1

3 0
2 years ago
Other questions:
  • 15 points
    5·2 answers
  • Computer-aided manufacturing (CAM) offers which possible benefits?
    15·2 answers
  • What is the different between 32bit anf 64 bit verision​
    11·1 answer
  • What is transmission control protocol?
    9·2 answers
  • In preparing his persuasive presentation, Reza should most likely focus on clearly presenting his
    6·2 answers
  • ____ is an approach to boundary spanning which results from using sophisticated software to search through large amounts of inte
    5·1 answer
  • Describe the forward button​
    7·1 answer
  • An electronic element that stores data by changing its resistance based on the current that has passed through it (similar to RR
    5·1 answer
  • Write a program that allows the user to enter three separate strings: a city name, a state name, and a ZIP code.
    5·1 answer
  • Which of these statements are true about domain controllers (dcs)? check all that apply.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!