Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Chapter 5. PC #2. Retail Price Calculator (page 312) Write a Java program that asks the user to enter an items wholesale cost and its

Chapter 5. PC #2. Retail Price Calculator (page 312)

Write a Java program that asks the user to enter an items wholesale cost and its markup percentage. It should then display the items retail price. For example:

If an items wholesale cost is 5.00 and its markup percentage is 100 percent, then the items retail price is 10.00.

If an items wholesale cost is 5.00 and its markup percentage is 50 percent, then the items retail price is 7.50.

The program should have a method named calculateRetail that receives the wholesale cost and the markup percentage as arguments, and returns the retail price of the item.

Class name: RetailPriceCalculator

Standard Input
10 50 10 100 10 -100 -1 

Required Output

Please enter the wholesale cost or -1 exit: Please enter the markup percentage or -1 exit: The retail price is: 15.00 Please enter the wholesale cost or -1 exit: Please enter the markup percentage or -1 exit: The retail price is: 20.00 Please enter the wholesale cost or -1 exit: Please enter the markup percentage or -1 exit: The retail price is: 0.00 Please enter the wholesale cost or -1 exit: 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

1. What is the difference between the mind and the brain?

Answered: 1 week ago