PriceCalc.java - import javax.swing.JOptionPane public class PriceCalc public static double calculateRetail(double wholeSaleCost double markupPercentage

PriceCalc.java - import javax.swing.JOptionPane public...

This preview shows page 1 out of 1 page.

import javax.swing.JOptionPane; public class PriceCalc { public static double calculateRetail(double wholeSaleCost, double markupPercentage) { double retailPrice; retailPrice =((markupPercentage / 100) * wholeSaleCost) + wholeSaleCost; 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: "); userWholeSaleCost= Double.parseDouble(userStringInput);
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