RetailPrice.java - import javax.swing.JOptionPane Chapter 5 Retail Price Calculator Programmer M Lakha This program asks user to enter an item's

RetailPrice.java - import javax.swing.JOptionPane Chapter 5...

This preview shows page 1 out of 1 page.

import javax.swing.JOptionPane;/*Chapter 5: Retail Price CalculatorProgrammer: M. Lakha This program asks user to enter an item's wholesale cost and its markup percentage.Then calculates and displays the item's retail price.*/public class RetailPrice{public static void main(String[] args){//initilize variablesdouble cost, markup, calculateRetail;String input; // to hold user's input//get wholesale cost input = JOptionPane.showInputDialog("Please enter wholesale cost");cost = Double.parseDouble(input); //get markup percentageinput = JOptionPane.showInputDialog("Please enter the markup
Background image

You've reached the end of your free preview.

Want to read the whole page?

  • Spring '12
  • Java Programming, Gaddis, public class, public static void, BCIS 3680

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture