Question: Write a program with two classes. Create a class named Find with methods of different numbers of parameters and methods having the same method name.

Write a program with two classes. Create a class named Find with methods of different numbers of parameters and methods having the same method name. Create the following:
1. Create the needed instance variable(s).
2. Create a default constructor or non-default constructor.
3. Write a method named FindLarge that accepts two numbers as parameters and then finds and returns the larger number.
4. Write a method named FindLarge that accepts three numbers as parameters and then finds and returns the largest number.
Create a class FindApp. This class will have the main method that demonstrates calling different methods with different numbers of parameters and method overloading.
Note: You need to ask the user to choose to enter 2 numbers or 3 numbers. Then, the user will input all numbers to be passed to the methods inside the Find Class. Lastly, the program will output the larger/largest number.
Also, you can create a get method to return the output to the method main or you can create a displayResult method to display the answer.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!