Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a interface called Customer which should have the methods calculatePreferredPoints, calculateCustomerDiscount. Implement this interface in a new class called Promotions. Write the override method

Create a interface called Customer which should have the methods calculatePreferredPoints, calculateCustomerDiscount.
Implement this interface in a new class called Promotions. Write the override method - calculatePreferredPoints to return a random points in integer. (Use Random Class method to from Java Library) Write the override method calculateCustomerDiscount to take the parameter of points and amount. calculate discount if points is more than 10 then return 50% else return 10%
Use your imagination to write an app to instantiate and use promotion class.

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

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions

Question

7. Identify four antecedents that influence intercultural contact.

Answered: 1 week ago

Question

5. Describe the relationship between history and identity.

Answered: 1 week ago