4.14 Example 2 Method overload
Hello, in the previous course we have seen how to create an overload method and how to use them in our program... in this course we will continue on the creation of overload method and we will make a challenge at the end... Without further ado we'll start by creating another another overloaded method without parameters, we will copy our method ... calculatesScore and get rid of the parameters, our method will allow us to display the name of the player playing and we can't ... can return nothing so we will remove the return type and put a void which means we will return nothing What we are trying to do here, when we overload a method, we create a a method, we create a unique method signature, so ... the signature is basically here, the unique part is the the actual name of the method, you can do the same in ... the three methods, We're going to call our calculateScore method without any parameters, if we run it now you can see that all three methods work correctly ... they all have a separate output and you can see that the output and you can see that the output corresponds to the instruction of our method... so you have to understand that changing the type of return it doesn't influence the global signature of the ... method so you have to change the number of parameters to make it unique now we're going to challenge you to make your own your own overloaded This challenge is focused on minutes, hours and seconds seconds using the concept of method overload. ... I will put the instruction at the end of this course took the time to do it right and ... in the next class we will make the correction. See you soon,