Question: Chapter Five Review Solve both of the following Programming Challenges from ch 5 RETAIL PRICE CALCULATOR Start by writing the entire program without using methods
Chapter Five Review
Solve both of the following Programming Challenges from ch 5
RETAIL PRICE CALCULATOR
Start by writing the entire program without using methods by inputting wholesale cost and markup percentage and then computing the retail price, and then printing the retail price. Test and run it
Next, modify the above perfect program by moving the computation of retail price to a method named calculateRetail This method gets sent the cost and markup from the main method and returns the retail price to the main method. Print the retail price from the main method.
RECTANGLE AREA
Open the AreaRectangle.java program from the chapter 5 code folder that you downloaded.
Next, assuming that you use Scanner, all you have to do is import Scanner and then add the 4 methods to the AreaRectangle.java program
One method asks for the length use Scanner
One method asks for the width use Scanner
One method asks for the area [length times width] simple calculation
One method asks you to print length, width and area
By using System.out.println
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
