Create a class name gasprices

Assignment Help Basic Computer Science
Reference no: EM13900263

Finish the problem can someone please help

Purpose: Create a class name GasPrices. Its main() method holds an integer variable named pricePerBarrel to which you will assign a value entered by a user at the keyboard. Create a method to which you pass pricePerBarrel. The method displays the range of possible prices per gallon. For example, if gas is $120 per barrel, then the price at the pump should be between  $4.20 and $4.80. Save the application as GasPrices.java

*/

import java.util.*;

public class GasPrices
{
public double perbarrel = 120;
public double pergallon_low = 4.20;
public double pergallon_high = 4.80;

public static void main (int pricePerBarrel)
{
Scanner s = new Scanner ( System.in );
System.out.print ( "pricePerBarrel : " );
double pricePerBarrel = s.nextDouble ();
System.out.printf
(
"pricePerGallon : %.2f to %.2fn",
getBecomes2 ( 120, 4.20, pricePerBarrel );
getBecomes2 ( 120, 4.80, pricePerBarrel );
)
}
}

Not sure where to do next

Reference no: EM13900263

Questions Cloud

Powerpoint slides for jive software optional : Powerpoint slides for Jive software. optional (handouts and sources)
What will be the optimal portfolia for agents : How would you model explicitly these two factors' impact on equities A and B? What assumptions will be required to assure general applicability of the standard APT framework to this model?
Identify characteristic of companies with accounts turnover : Categorize each of the preceding companies as to whether its turnover ratio is above or below 15. Based upon (2), identify a characteristic of companies with accounts receivable turnover ratios above 15.
Add delete and update records within a table : Add, delete, and update records within a table.  Write questions that select specific records from a table for viewing. View data on a PDA.
Create a class name gasprices : Purpose: Create a class name GasPrices. Its main() method holds an integer variable named pricePerBarrel to which you will assign a value entered by a user at the keyboard. Create a method to which you pass pricePerBarrel. The method displays the ran..
What are some of the key concerns for her staff : What are some ways she can work her own training into her schedule? What are some of the key concerns for her staff, and how might they be addressed
Defines the middle 95% of the distribution of sample means : For random samples of size n = 25 selected from a normal distribution with a mean of m = 50 and a standard deviation of s =20, find each of the following: The range of sample means that defines the middle 95% of the distribution of sample means.
What proportion of the scores have values : A population of scores forms a normal distribution with a mean of m = 80 and a standard deviation of s = 10. What proportion of the scores have values between 75 and 85?
Discuss whether chris is behaving in a professional manner : During the preparation of the bank reconciliation for The Image Co. Discuss whether Chris is behaving in a professional manner.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Design and create a website with html

Your task is to create a website on anything that is of interest to you. The website will need to have minimum of 3 web pages. This means that you have an index page that will link to other pages and vice versa.

  Describe how you identified options for handling challenges

Describe how you identified/evaluated options for handling those challenges. Describe how you resolved/overcame the challenge(s)

  Conduct internet searches to find the information described

Conduct Internet searches to find the information described in one of the activities below. Write a brief report summarizing your research results. Be sure to document your sources, using the APA format. Submit the report to your instructor.

  What is inheritance

A. What is inheritance ?B.  What are different forms of inheritance?C. Give one example of single level inheritance in C++

  What is the binary number which represents a decimal

What is the binary number which represents a decimal 4 and If a digital system has 5 inputs, how many possible input combinations are there?

  Byte-stuff the subsequent frame payload

Byte-stuff the subsequent frame payload in which E is the escape byte, F is the flag byte, and D is a data byte other than an escape of a flag character.

  Identify and evaluate two online stores

Identify and evaluate two online stores that sell business furniture. Briefly summarize your findings.

  Advantages of a content delivery network

Based on the Kramer (2013) article in the Electronic Reserve Readings, what are the advantages and disadvantages of a content delivery network (CDN)

  Explaining initial values of cache tags and cache lines

Assuming that the initial values of the cache tags and the cache lines are completely arbitrary, Also, show how the cache tags will change for each of the above steps. You should justify your answer.

  Draw context diagram and the level 0 expansion

Draw Context Diagram and the Level 0 Expansion for the following problem The pharmacy at Mercy Hospital fills medical prescriptions for all hospital patients and distributes these medications to the nurse stations responsible for the patients' care. ..

  How the different tasks will play a part in future career.

How the different tasks will play a part in your current position or future career.

  How would you deallocate memory in a destructor

We can use the destructor to deallocate memory for an object. How would you deallocate memory in a destructor?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd