PriceCalculator.java - import javax.swing.JOptionPane public class PriceCalculator public static double calculateRetail double wholeSaleCostGiven double

PriceCalculator.java - import javax.swing.JOptionPane...

This preview shows page 1 out of 1 page.

import javax.swing.JOptionPane; public class PriceCalculator{ public static double calculateRetail( double wholeSaleCostGiven, double markupPercentageGiven ) { double retailPrice; retailPrice = ( ( markupPercentageGiven / 100 ) * wholeSaleCostGiven ) + wholeSaleCostGiven; return retailPrice; } public static void main( String [] args ) { String userStringInput; double userWholeSaleCost; double userMarkupPercentage; double retailPriceCalculated; userStringInput = JOptionPane.showInputDialog( "Please enter the whole sale cost of the item: ");
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Fall '16

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture