Question: In this activity, you will learn how to overload methods. Please follow the steps below: Steps: Go to the Guitar.java file Overload the Bass method


In this activity, you will learn how to overload methods. Please follow the steps below:

Steps:

  1. Go to the Guitar.java file
  2. Overload the Bass method to include the amount of strings and sound. Return a string that matches the output of the int strings and String sound. *** DO NOT HARD CODE THE VALUES***
  3. Overload the Bass method to include strings, sound, and size. Return a string that matches this output if the int strings, String sound, and int size. *** DO NOT HARD CODE THE VALUES***
  4. Print out the string that is returned from the overloaded method you made with two parameters: the int should be 3 and the String should be "deep sounds!"
  5. Print out the string that is returned from the overloaded method you made with three parameters: the strings should be 9, the sound should be "clanging sounds" and the size in should be 3.




Step by Step Solution

3.46 Rating (143 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres the modified Guitarjava file after overloading the Bass method public class Guitar ... View full answer

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!