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

  Explain it ethics and responsible conduct

Specify the main reasons why green computing should be part of any organization's social responsibility posture. Next, propose three (3) actions that IT organizations could take to reduce their carbon footprint.

  Develop a prototype that exhibits improved functionality

Develop a prototype that exhibits improved functionality for the e-commerce site (apple.com or amazon.com). You can choose either of the two e-commerce sites (apple.com or amazon.com) as the subject of your prototyped enhancements.

  What is uml

What is UML and how is it useful in designing large systems?

  Business continuity plans and disaster recovery

In recent years, organizations have witnessed the impact of having effective and non-effective business continuity plans and disaster recovery plans. In today's environment, with significant potential natural disasters, terrorist threats, and othe..

  Managing incidents before they occur

Using the concept "Managing incidents before they occur," describe how a company (like iPremier) could put operations in place to handle any kind of negative network event (like the Distribution of Service (DOS) attack).

  Define collaboration and social media

While planning for a new project, a young developer mentions that she used Facebook as a collaborative group space for developing her senior project. She tells you that it was the ideal solution since it was free and all of her group members were ..

  Impact of meals on world-ecological and economic perspective

Write about the impact that two (2) of your meals have on our world from an ecological and economic perspective.

  Create a boardroom-quality presentation

Develop a local area network plan for Taylor & Sons Financial Consulting, including the layout of the network, user and group access, and security. Create a boardroom-quality Microsoft® PowerPoint® presentation of 10-12 slides detailing your plan.

  Explaining the available bandwidth as function of n

Assuming average packet size is 5 slot times, expreess the available bandwidth as a function of N?

  Find the percentage of swap operations in instruction mix

If implementation of instruction in hardware will increase th clock period of single-instruction implementation by 10%, what percentage of swap operations in instruction mix would suggest implementing it in hardware?

  Find speedup gain of using simd computer over sisd computer

If both SISD and SIMD machines run at same clock speed, determine the speedup gain of using the SIMD computer over the SISD computer?

  Describe the output following series of stack operations

Describe the output of the following series of stack operations: push(5),push(3), push(2), push(8), pop(), top(), push(9), push(1), pop(), push(7),push(6), top(), pop(), push(4), pop()

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