014-005-008
Difference Between Override and Overload
Medium
Problem Description
Difference Between Override and Overload
Learning Objective: Understand the difference between method override and overload
Overview
Create a program that implements both overloading within a class and overriding through inheritance.
Specifications
- Define add(int, int) method in Calculator class
- Overload with add(double, double) in same class
- AdvancedCalculator extends Calculator and overrides add(int, int)
- Test all methods in Main
Output Format
Int add: 30
Double add: 7.5
Advanced add: 35
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
