Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 399 Weeks Ago, 1 Day Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 28 Aug 2017 My Price 13.00

values of money

The object is to calculate the cost of a paint job A painting company has determined that for every 112 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $35.00 per hour for labor. Modify your program so that it prints all values of money as numbers with exactly 2 decimal places.

 

Expected Output:

 

Enter the number of square feet: 224

 

Enter the price of a gallon of paint: 20

 

To paint 224.00 square feet, with paint that costs 20.00 per gallon,

 

you will need 2 gallons of paint and 16.00 hours of labor.

 

The cost of the paint is: 40.00

 

The cost of the labor is: 560.00 The total cost of the job is: 600.00

public class PaintJobEstimator { // square feet per one gallon of paint. public static final double AREA_PER_GALLON = 112.0; // hours of labor needed to paint AREA_PER_GALLON square feet. public static final double HOURS_PER_UNIT_AREA = 8.0; // charge to customer for one hour of labor. public static final double LABOR_COST_PER_HOUR = 35.0; // main declares a Scanner that is passed to // the input methods. main also controls the // order of calculations. public static void main( String[] args ) { Scanner keyboard = new Scanner( System.in ); // How many square feet do we need to paint? double sqft = getInput( keyboard, "Enter the number of square feet: " ); double gallonCost = getInput( keyboard, "Enter the price of a gallon of paint: " ); int numGallons = calculateGallons( sqft ); double hoursLabor = calculateHours( sqft ); double paintCost = calculatePaintCost( numGallons, gallonCost ); double laborCost = calculateLaborCost( hoursLabor ); double totalCost = calculateTotalCost( paintCost, laborCost ); // Print the results. generateReport( sqft, gallonCost, numGallons, hoursLabor, paintCost, laborCost, totalCost); } public static double getInput( Scanner input, String prompt ) { System.out.print( prompt ); while ( !input.hasNextDouble() ) { input.nextLine(); // get rid of bad input. System.out.print( prompt ); } double inValue = input.nextDouble(); input.nextLine(); // clear the input line. return inValue; } // calculateGallons // calculateHours // calculatePaintCost // calculateLaborCost // calculateTotalCost // generateReport }

Answers

(5)
Status NEW Posted 28 Aug 2017 01:08 PM My Price 13.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)