Yahoo Clever wird am 4. Mai 2021 (Eastern Time, Zeitzone US-Ostküste) eingestellt. Ab dem 20. April 2021 (Eastern Time) ist die Website von Yahoo Clever nur noch im reinen Lesemodus verfügbar. Andere Yahoo Produkte oder Dienste oder Ihr Yahoo Account sind von diesen Änderungen nicht betroffen. Auf dieser Hilfeseite finden Sie weitere Informationen zur Einstellung von Yahoo Clever und dazu, wie Sie Ihre Daten herunterladen.
Java programming?
can someone help me with a task?
In the constructor, assign the value taken in from the parameters to the corresponding constant field, and call the mutator (“setter”) called setDescription to set the description. Be sure the constant is set before calling the setter. (You will need to create a “stub” of the method setDescription in order to compile – in Eclipse just hover over the error message and choose the “create method” option)
public class Function {
// private class that cannot be changed.
private double FUNCTION_CHOICE;
private final String description;
// creating constructor argument
public Function(String index)
{
}
}
this is what I have so far, I jsut confused what im supposed to do thanks
2 Antworten
- Anonymvor 5 Jahren
It seems very badly worded, from I got this from it:
public class Function
{
private double FUNCTION_CHOICE;
private final String description;
public Function(String index)
{
description = index;
}
public void setDescription(String description)
{
this.description = description;
}
}
Like I said, it's worded strangely, but based on how you interpreted it, it looks like this is how it is meant to be set up.
- Anonymvor 5 Jahren
no