Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribedWRITE 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 percent

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

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago