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

  Implementation of it and it goals of organization

You will conduct an evaluation of the business goals of DynCorp International. Prepare a mapping of IT goals for DynCorp International that will support the business goals.

  Network consultation proposal

Explain the role of integrity and availability in a networked environment.Use technology and information resources to research issues in computing networks.

  What effect does font selection have on readability

What effect does font selection have on readability and the viewer's perception and How does the use of font further or hinder the intended message?

  Banner advertising on web sites trigger realization

Banner advertising on Web sites helps trigger realization that there is gap between reality and desired state which occurs in?

  Creating truly anonymous electronic cash requires a bank to

1. refers to preventing data delays or denials.integritysecrecynecessityreadinessnbspquestion 2 refers to protecting

  How you configure an operating system interface with network

How do you configure an operating system to interface with a network

  Industry specific applications

Does Microsoft's entry into industry-specific applications signal end for smaller industry specific software developers? What changes in strategy through such developers are necessary to compete with Microsoft?

  Method in phone charger class

Which of the following would be a more appropriate choice for a method in a PhoneCharger class

  Mobility, cdma, and gsm

In a paper of at least two pages (excluding the title and reference pages), discuss a minimum of three mobile web applications that are familiar or that you use regularly. Describe the differences between CDMA and GSM. Discuss how CDMA and GSM suppor..

  Review and discuss methods for it managers to maintain

Review and discuss methods for IT managers to maintain their skills while gaining new managerial skills

  Does your company use both lan and wan technologies

Could any of the technologies (Ethernet, token ring, fast Ethernet, 100VG-AnyLAN or gigabit Ethernet) improve your current network's performance?

  Create an android project that contains two pages

Create an Android project that contains two pages. The button on the first page would open the second page.The first page contains a label, which states your name (Juan Ruiz) and a button states "Click to see my favorite animal".

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