Question: Add reducePrice ( double reductionAmount ) method to the Product class. It will be a void method ( Note: void methods do not return values
Add reducePricedouble reductionAmount method to the Product class. It will be a void method Note: void methods do not return values Don't make any other changes to this class.
Supply a program ProductDemo that makes a product, prints the product name and price, reduces its prices by $ and then prints the reduced price.
Submit Product.java, ProductDemo.java, and output screenshot.
Note: You don't need to declare new variables. This method reducePrice is similar to the withdraw method in the BankAccount class. We reduce the bank account balance by some amount.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
