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
Review the given requirements using the checklist and discover possible problems with them. The following requirements are for a
KATRIN_1 [288]

Answer:

Redundancy

Req. 1 and Req. 3 are seemed to say the same thing. We need to remove the first sentence in Req. 1

Conflict and understandability

Req. 1 states that access is through web browser while Req. 4 states that access is via html. We have to re-write the Req. 3 to make it clear that users do not actually have to write directly html to communicate with the system.

Completeness

Req. 5 states that print out will “mainly” be documents. What else might be printed? What other inputs will be produced?

Either remove mainly or clarify other print out.

What version of html or web browser is assumed in Req. 1 and Req. 3?

Explanation:

5 0
3 years ago
Please solve in 5 mins very fast​
Dmitriy789 [7]

Answer:

a. virtual reality

b. Master Boot Records

c. Primary function of a router

d. zoom

Explanation:

4 0
3 years ago
Read 2 more answers
What is the Moore's law
Nadya [2.5K]

Answer:

Hi, in the law of Moore we can express aproxitmaly for each <em>two years</em> is duplicated the number of transitors in a microprocessor.

Explanation:

In around 26 years the number of transitors has increased about 3200 times, a transitor is a way to regulate the current voltage flow and can be act like a <em>switch</em> for an electronic signal.

I hope it's help you.

4 0
3 years ago
You need to design a new Access database. The first step is to organize the smallest to largest data, also called a. Alphabetica
Whitepunk [10]

Answer: d) Hierarchy of data

Explanation:

  • Hierarchy of data is defined as arrangement of data in systematic way .The arrangement of files,character,records etc is done in a particular order usually in terms of highest level and lowest level .
  • According to the question ,hierarchy of data should be used for organizing data from smallest stage to highest stage for database designing.
  • Other options are incorrect alphabetical designing is based on alphabetical order. Detail structure is a model made on basis of details and features.
  • Data design is the model or structure that includes data and related factors as building block.Logical order is the organizing elements on basis of particular logic.
  • Thus, the correct option is option(d).  
3 0
3 years ago
What is the famous saying among computer programmers that refers to the fact that computers cannot tell the difference between g
jek_recluse [69]

Answer:

Garbage in, garbage out

Explanation:

Garbage in, garbage out is the famous saying among computer programmers that incorrect, poor-quality, flawed, or nonsense input will produce incorrect, poor-quality, flawed, or nonsense output while correct, good quality or valuable input will produce correct, good quality or valuable output. it is basically saying that computers cannot tell the difference between good and bad data.

7 0
3 years ago
Read 2 more answers
Other questions:
  • A type TW cable containing two No. 12 copper conductors has a maximum overcurrent protection of
    7·2 answers
  • Why Unicode is the standard way of converting binary to text?
    8·1 answer
  • The file extensions .webm, .m4v, and .ogv are used for:
    15·1 answer
  • Helena purchased a security software package to protect her new laptop against threats such as spyware and computer viruses. she
    14·1 answer
  • When targeting customers of the consumer population at market a product, what type of segmentation information would be most hel
    12·2 answers
  • HELP ASAP !!! What should be a one-page document?
    7·1 answer
  • List any two programs that are required to play multimedia products
    8·1 answer
  • QUICK HELP ME PLEASE
    9·1 answer
  • hi pls help me how to connect my imac to our wifi cause it’s not showing the wifi option (use pic for reference)
    7·1 answer
  • I WILL MARK BRAINIEST FOR THIS!!!!!!
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!