FranceBB
1st November 2020, 05:13
Hi there.
Sorry to bother you all, but the professor just gave us some assignments (as he always does), but this time it's like 59 pages worth of multiple choices questions and other open questions that we have to answer ourselves. One of those is:
"What's the Signature of an Operation in Java? Make an example"
Now... what the heck does he mean with Operation?
Does he mean "method"? 'cause I know what a Signature of a Method is, but I couldn't find anything anywhere about the Signature of an Operation in Java and the slides (PDF) don't really help either.
AFAIK a Signature is a declaration of a method with a return type, the name of the method, the type and the name of (eventual) parameters passed as input. Generally, the definition of a method uses the same syntax used for the procedures with some additional indicators that make the encapsulation of information possible.
An example would be:
public void setMapPointerReference(int x, int y)
{
//code of the method
}
The Signature, in this case, would be "SetMapPointerReference(int x, int y)".
In other words, it's the name of the method and the list of the parameters.
Did I get it right? Is it the same for operations? Does he mean method when he says operations? Can you make an example?
Thank you in advance,
Frank
Sorry to bother you all, but the professor just gave us some assignments (as he always does), but this time it's like 59 pages worth of multiple choices questions and other open questions that we have to answer ourselves. One of those is:
"What's the Signature of an Operation in Java? Make an example"
Now... what the heck does he mean with Operation?
Does he mean "method"? 'cause I know what a Signature of a Method is, but I couldn't find anything anywhere about the Signature of an Operation in Java and the slides (PDF) don't really help either.
AFAIK a Signature is a declaration of a method with a return type, the name of the method, the type and the name of (eventual) parameters passed as input. Generally, the definition of a method uses the same syntax used for the procedures with some additional indicators that make the encapsulation of information possible.
An example would be:
public void setMapPointerReference(int x, int y)
{
//code of the method
}
The Signature, in this case, would be "SetMapPointerReference(int x, int y)".
In other words, it's the name of the method and the list of the parameters.
Did I get it right? Is it the same for operations? Does he mean method when he says operations? Can you make an example?
Thank you in advance,
Frank