Create a Java program that does the following: 1. Ask the user to enter a retail price 2. Ask the user to enter a discount percentage (you can decide the format - 20 or .20) 3. Code a new method,...


Create a Java program that does the following:


1.  Ask the user to enter a retail price


2.  Ask the user to enter a discount percentage (you can decide the format - 20 or .20)


3.  Code a new method, calcSalePrice that accepts the retail price and discount percentage as parameters, and returns the sale price using the formula: retail price - (retail price * discount percentage)


4.  Create a variable that will hold the return value from the method.


5.  Assign the calcSalePrice return value to the variable, and then print out the sale price from the main method.




Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here