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
​Lisa mentions that a program is developed to interact with other programs, and she wants to begin by testing the programs indiv
Ronch [10]

QC TESTER(quality testing process) is the name of this process.

To name this process call QC TESTER

<u>Explanation:</u>

Any software development environment their will QC testing (quality testing process) where end user will do or simulate complete testing of software make the software bug free.

After QC tester confirm the program as bug free then only software implementation team ready for implementation process. QC tester is important role in software development environment to find a bug on function, data input entry and monitor result from software and inform to software team with list of bug results.

This process will take place to and from between QC tester and software developer team till software become bug free.  

6 0
2 years ago
Do laws ever change to help enforce cyber hacking crimes
prisoha [69]
No I don’t think so personally
5 0
2 years ago
Read 2 more answers
Which format must a document be saved in to share it between two different word processors?. Select one of the options below as
slava [35]
When two different word processors are used to share a document, the word document must be saved in the compatibility format where some of the aspects of one version is retained and reflected in the other version while others cannot be retrieved due to the alteration or absence of a component. 

6 0
2 years ago
How can i see what websites are visited on my wifi
grigory [225]

Answer:

If you want to view sites visited on a wireless network, you can check the logs stored by the wireless router to see what information is available. You may need to set your logging settings to capture the data you want.

Explanation:

5 0
2 years ago
What is the purpose of an index page feature in a Word document? Check all that apply.
Delvig [45]

Answer:

A. Helps to quickly find information in a document

B. Points readers to specific page numbers

D. Locates specific sections within a document

4 0
3 years ago
Read 2 more answers
Other questions:
  • Consider the following classes:
    8·1 answer
  • Which of the following is NOT a group on the Slide Master tab?
    6·1 answer
  • If there is a circuit that is being used 36 CCS then how much of that circuit is being used in Erlang?
    8·1 answer
  • Explain with the help of an example that family background affects the entrepreneurial behaviour of people
    12·1 answer
  • The amount of blank space between each line of text line spacing
    5·1 answer
  • Favorite color should it be stored why?or why not?<br>​
    6·1 answer
  • Problem: Mr. James Reid, the director of admissions at MOGCHS University, has
    14·1 answer
  • Hi, what’s up, im really bored and have nothing to do
    7·2 answers
  • How does the sky change as onegets above Earth’s atmosphere?
    5·1 answer
  • You send a friend a private message about something personal that is going on with you. Without permission, she forwards your te
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!