I apologize if this comes off as someone simply turning to stack overflow or if it sounds too easy. I've been stuck on this problem all day and all the resources I've tried (google, stack-overflow, friends and Oracle Java books haven't proved helpful.
So i was given the following section of code I have to work on.
import org.Plugin
public interface Product<T extends Data>{
void Customer(Plugin<T> plugin);
}
I've managed to break down the base of what this code does, concerning the Product class I know that:
- T extends Data : Bounded type parameter for T, T has to be a subclass of Data
- I need to build a class that implements the Product class along the the Customer method.
So far I came up with this:
class TheProduct implements Product{
@Override
public void Customer(Plugin plugin){
}
}
What i'm confused about, is what the (Plugin<T> plugin)
part of the Consumer method does. Does Plugin refer to a parameter such as a variable? If so, do I need to include it in TheProduct class?
I feel like i'm missing something major but have no idea what.
Thank you to everyone who took the time to read :)