I have an absract class that describes a general functionality of children classes. When I initialize a child class I want to set a specific enum class as a member on the parent abstract class. How can I do that?
Example: AbstractFunctionality.java
public abstract class AbstractFunctionality {
protected String Name;
protected String Surname;
// specific enum class
public AbstractFunctionality(String Name, String Surname){
this.Name = Name;
this.Surname = Surname;
}
}
Child1.java
public class Child1 extends AbstractFunctionality {
public Child1(){
super("Jane","Austen");
}
}
How can I specify that I want the public enum Writers in my Child1 class?