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
The function retrieveAt of the class arrayListType is written as a void function. Rewrite this function so that it is written as
Mariana [72]

Answer:

int retrieveAt(int location, array){

   // Function to retrieve the element from the list at the position

   // specified by the location

   if (location <= array.size() - 1){

       return array[location];

   } else{

       cout<<"Location out of range";

       assert(); // Assuming the assert function is defined in the program.

   }

}

Explanation:

The void retrieveAt function is converted to a return function that returns the integer item of the array given the location and the array variable as arguments. The assert function is used to terminate the program.

4 0
3 years ago
What command enables you to initialize quotas on a file system?
jeka57 [31]
 Quotas can be enabled by mounting a partition with the usrquota (and optionally the grpquota) mount option(s).Normally this is done by editing /etc/fstab and adding usrquota to the mount options part of the entry for some filesystem.Then that <span>filesystem must be remounted ("mount -o remount filesystem").</span>
4 0
3 years ago
You have one IP address provided from your ISP with a /30 mask. However, you have 300 users that need to access the Internet. Wh
DedPeter [7]

Answer:

A. PAT.

Explanation:

Based on the detail given the technology I will

basically use to help implement the solution will be PAT which full meaning is PORT ADDRESS TRANSLATION reason been that PAT is a technology that enables multiple users to have access to the internet and secondly PORT ADDRESS TRANSLATION (PAT) can often share one IP public address to multiple or different internet users at a time.

8 0
3 years ago
Which of these features will future games incorporate?
omeli [17]
Tactical ai and lighting
6 0
3 years ago
Read 2 more answers
While designing web pages for mobiles, the page content should be extensive such that the readers get the opportunity to explore
mixer [17]

Answer:

True

Explanation:

The readers need to know the aspects of the topic that will broaden their knowledge and idea. So when designing a web page it is very good to provide extensive content such as hyperlinks to related articles on the same topic. To broaden their reading scope.

However this should be done cautiously, not to provide facets that will end up distracting the importance and the core aspect of the main topic.

3 0
3 years ago
Read 2 more answers
Other questions:
  • What is the hexadecimal and decimal equivalent of the binary number 110010001110
    5·1 answer
  • What is a record? What is a field? How are they represented in Access?
    8·1 answer
  • Refer to the exhibit. A company is deploying an IPv6 addressing scheme for its network. The company design document indicates th
    11·1 answer
  • You can enter _____ in a cell to display tomorrow’s date
    12·1 answer
  • Me Completan Pliiiis
    11·1 answer
  • 2. Sherry bought the following articles
    7·1 answer
  • What are the advantages of knowing demographics over psychographics and vice versa?
    12·1 answer
  • 1. Write a programme to print the Fees Receipt of English High School Required Inputs Name of the Student Monthly Tuition Fees M
    10·1 answer
  • You are the network administrator for a city library. Throughout the library, there are several groups of computers that provide
    12·1 answer
  • Given the tables PRODUCT (ProductID. Description. Cost) SUPPLIER (Supplier D. ContactName, Phone Number) as shown in the figure
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!