Question: Create a class named Application. 2 . Inside the Application class, implement the following three overloaded methods: doSomething ( int x , int y )
Create a class named Application. Inside the Application class, implement the following three overloaded methods: doSomethingint x int y: Adds the two integer values and prints the result. doSomethingString x String y: Concatenates the two strings and prints the result. doSomethingint x int y String z: Adds the two integers and then concatenates the result with the string, printing the final output. Implement a start method that calls all three overloaded doSomething methods with appropriate arguments. Create a Main class with a main method that: Instantiates the Application class. Calls one of the overloaded doSomething methods to test your code. Modify the doSomething method with integer parameters to check if the sum is positive or negative, and print a message indicating whether the result is positive, negative, or zero.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
