Lets say i have a method
public abstract void doMath(Holder h);
But I want the user to be able to adjust the class being passed in. Like such
public abstract void doMath(ClassOfPersonalChoice h);
How would I go about doing that.
Thank you for your time and effort.
PS: The class being passed contains a bunch of variables.
ie.
class ClassofPersonalChoice{
double hue = 0;
int R = 240;
int G = 10;
int B = 180;
}
If you say
then the user can implement whatever he wants.
Advanced idea: use generics/type parameters: