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
jolli1 [7]
3 years ago
9

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:
Bezzdna [24]3 years ago
4 0

Answer:

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

  double cost = 0;

  double priceF, priceS, priceT;

  int nOne = 0, nTwo = 0, nThree = 0;

  int fBurn, sBurn, tBurn;

  int burnTime = 0;

  isEnd = "n";

   while (isEnd == "n"){

      Scanner in = new Scanner(System.in);

      int option = in.nextInt();

      if (option == 1){

            priceF = 2.50;

            fBurn = 5;

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

            nOne += in.nextInt();

            burnTime += fBurn * nOne;

            cost += priceF * nOne;

        } else if (option== 2){

            priceS = 3.75;

            sBurn = 7;

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

            nTwo += in.nextInt();

            burnTime += sBurn * nTwo;

            cost += priceS * nTwo;

        } else if(option == 3){

            priceT = 5.99;

            tBurn = 12;

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

            nThree += in.nextInt();

            burnTime += tBurn * nThree ;

            cost += priceT * nThree;

        } else{

            System.out.println("option must be between 1 and 3");

        }

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

      isEnd = in.nextLine();

  }

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

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

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

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

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

  double cpm = (burnTime * 60) / cost;

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

}

}

Explanation:

The Java program prompts the user to continuously choose from three options 1, 2 and 3. The prices, the burn time and the cost per minute burn of the total candles ordered are printed out.

You might be interested in
A hub is a central computer true or false?
klio [65]

Answer:

hub is central computer.....True...

4 0
2 years ago
Read 2 more answers
The one who will defeat me in this typing race I will mark the one brainliest:
fredd [130]

Answer:

yes

Explanation:

can you send the link....

5 0
3 years ago
Read 2 more answers
Select the true statement from the choices below. Group of answer choices Invalid code may cause browsers to render the pages sl
IrinaK [193]

Answer:

(A) A web page will not display in a browser unless it passes syntax validation testing.

(C)A web page must pass syntax validation testing before it is used.

Explanation:

A website is a collection of related web pages. A web page is an electronically arranged content page, designed and developed using web development application and language tool and hosted on a web server.

Web page or application development follows a series of well defined stages called software development life cycle (SDLC). The web application must go through these processes from birth to the end-of-life of the application.

The validation testing in SDLC, consisting of unit, acceptance and loading testing, which checks for syntax error or bugs on the written codes, because bugs could slow the loading of the page or even the display and browser compatibility of elements in the code.

5 0
3 years ago
Brock wants to use several images on his hiking blog. However, the images are making his pages load very slowly. Explain to Broc
attashe74 [19]
First brock has to make sure he has all the hiking gear, like a camel back, gloves, the right pair of shoes. and then if he wants to take pictures he should buy a go-pro so he doesn't really have to move will the go-pro will record or take pictures.
hope i helped 0-0 ;p
plz mark brainly
5 0
3 years ago
Who is credited with writing Google's famous page ranking search algorithm?
vaieri [72.5K]
Larry page is the correct answer :)
4 0
2 years ago
Other questions:
  • Jim is in the market for a car that will last for the next 10 years and has saved up some money for the purpose of a car. What’s
    6·1 answer
  • Truncation is a keyword search technique that helps you find useful variations of a term or terms. You want to find books on the
    5·1 answer
  • A(n) _____________ is a system that prevents a specific type of information from moving between untrusted networks and private n
    9·1 answer
  • Which statement is not true? An audit objective for systems maintenance is to detect unauthorized access to application database
    8·1 answer
  • The _______ of a secondary storage device indicates how much data the storage medium can hold.
    13·1 answer
  • While speech recognition can operate without any confi guration, you can train it to more accurately recognize your voice. true
    5·1 answer
  • What invention in the past do you think had a significant impact on our culture/ lifestyle? What do you think will be invented/
    11·1 answer
  • Not every organization integrates with the Internet, but all use some or most of the technology that gave rise to it.
    15·1 answer
  • How are software myths affecting software process?. Explain with example​
    9·1 answer
  • PLEASE HURRY!!!!<br> Look at the image below
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!