Answered step by step
Verified Expert Solution
Question
1 Approved Answer
WRITE CODE IN JAVA. ALREADY ASKED QUESTION, BUT CAN'T SEE THE ANSWER AND LOST A QUESTION TOO. A video club wants to reward its best
WRITE CODE IN JAVA. ALREADY ASKED QUESTION, BUT CAN'T SEE THE ANSWER AND LOST A QUESTION TOO.
A video club wants to reward its best members with a discount based on the member's number of movie rentals and the number of new members referred by the member. The discount is in percent and is equal to the sum of the rentals and the referrals, but it cannot exceed 75 percent. (Hint: Math.min.) Write a program DiscountCalculator to calculate the value of the discount. Hint: You can use Math.min to get smaller of two int values (https://www.tutorialspoint.com/java/lang/math min int.htm 2 ) Here is a sample run: Test Data1 Enter the number of movie rentals: 56 Enter the number of members referred to the video club: 3 The discount is equal to: 59.00 percent. Test Data2 Enter the number of movie rentals: 70 Enter the number of members referred to the video club: 10 The discount is equal to: 75.00 percentStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started