In this activity, you will learn how to overload methods. Please follow the steps below: Steps: Go
Fantastic news! We've Found the answer you've been seeking!
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 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***
- 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***
- 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!"
- 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.
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: