Professional Documents
Culture Documents
Java Practice 2
Java Practice 2
Objective:
Create a Java class named Calculator that implements basic arithmetic operations and
utilizes method overloading.
Requirements:
1. Class Structure:
2. Method Overloading:
• For add:
➢ Overload the add method to handle addition of three integers.
• For subtract:
➢ Overload the subtract method to handle subtracting three integers.
• For multiply:
➢ Overload the multiply method to handle multiplying three integers.
3. Input/Output:
• Create a main method in a separate class to test the functionality of the Calculator
class.
• Instantiate an object of the Calculator class and demonstrate the use of each method
with different sets of values.
• Display the results of each operation.