Computer Applications
Which OOP principle implements method overloading?
User Defined Methods
ICSE 2007
32 Likes
Answer
Polymorphism implements method overloading.
Answered By
18 Likes
Related Questions
What is the role of the keyword void in declaring methods?
If a method contains several return statements, how many of them will be executed?
How are the following data passed to a method?
- Primitive types
- Reference types
Write a program in Java using a method Discount( ), to calculate a single discount or a successive discount. Use overload methods Discount(int), Discount(int,int) and Discount(int,int,int) to calculate single discount and successive discount respectively. Calculate and display the amount to be paid by the customer after getting discounts on the printed price of an article.
Sample Input:
Printed price: ₹12000
Successive discounts = 10%, 8%
= ₹(12000 - 1200)
= ₹(10800 - 864)
Amount to be paid = ₹9936