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

PriceCalculator.java - package pricecalculator import...

This preview shows page 1 out of 1 page.

package pricecalculator; 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 wholesale cost of the item: ");
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Fall '19
  • public class PriceCalculator, public static double calculateRetail

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture