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
​Disabling the SSID broadcast of a network makes that network ____ to roaming devices.
marshall27 [118]

Answer:

The correct answer to the following question will be "Invisible".

Explanation:

  • SSID transmits the name to the surrounding devices by your router. The main function is to visibly and easily access your network. Usually your default router SSID will involve its brand name.
  • When a wireless device scans the WLAN area, it detects SSID to be connected to the router. However, SSID broadcast may also be disabled by default.
  • SSID Broadcast deactivation is one way of securing your wireless network and makes all the networks invisible.
8 0
3 years ago
Hybrid processors that can process 32 bits or 64 bits are known by what term?
patriot [66]
For the answer to the question above asking, what h<span>ybrid processors that can process 32 bits or 64 bits are known by what term?

I think you are referring to the Chipset. and they are Manufactured by Intel and Advance Micro Devices (AMD). Intel's Pentium is the first one to have 32 bits and 64 bits of processors.</span>
4 0
3 years ago
The first step in any _______ is to determine whether the project is relevant to the purpose, audience, and audience needs. [Pur
Paha777 [63]

Answer:

The answer is "Design process".

Explanation:

In the given question one option is missing, that can be described as follows:  

The Design Method is also a technique to slicing a big project into small pieces. Using guidelines to describe the necessary steps to resolve each plan, and ensure to maintain onto all those suggestions and drawings throughout the process, and wrong choices can be described as follows:

  • It any project, the main purpose is used to determine its relevancy.
  • In the design process, it's helpful to the audience, and there needs.
8 0
3 years ago
Write a function match that takes a valu * pattern and returns a (string * valu) list option, namely NONE if the pattern does no
yan [13]

Answer:

Check the explanation

Explanation:

fun match (v,p)   =

    case (v,p) of  

     (_,Wildcard) => SOME []

    |(Const v1,ConstP p1) =>if v1 = p1 then SOME [] else NONE

    |(Unit,UnitP) =>SOME []

    |(Constructor (s ,v1),ConstructorP (s1, p1) ) => if s = s1 then match(v1,p1) else NONE

    |(Tuple vs,TupleP ps) => if List.length vs = List.length ps  

                             then case all_answers match (ListPair.zip(vs,ps))  of

                                   SOME v2=>SOME v2

                                  |_ => NONE

                             else NONE

    |(_, Variable s ) => SOME [(s,v)]

    |(_,_) => NONE

5 0
4 years ago
Your classmate constructs a simple computer that adds numbers. There are 5 wires for inputting the first
N76 [4]

Answer:

26

Explanation:

7 0
3 years ago
Other questions:
  • What is the intranet?
    12·1 answer
  • What does an operating system do?
    11·2 answers
  • Suppose a classmate constructed an electric motor with a solid commutator.that is, the commutator has no split. This solid commu
    9·1 answer
  • Write the CSS for an id with the following attributes: i. float to the left of the page. ii. light tan background. iii. Verdana
    8·1 answer
  • Kurran posts photos of himself to his blog.He later decided to delete a photo from his blog.Suggest why the photo might not be r
    6·1 answer
  • Do rats smell good? what do you think
    8·2 answers
  • Illusions in physcology​
    14·1 answer
  • You are configuring two PCs for your network, PC-A is given an IP address of 192.168.1.18 and PC-B is given an IP address of 192
    15·1 answer
  • Discuss any five factors that hinder the application of a computer in business organisations​
    15·2 answers
  • Write a summary on the video "Greatest Inventions w/Bill Nye".
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!