I have a class which 4 fields which I need to be able to set and get. I have to use setters and getters, but also instead of using regular fields, have to use an enum. This concept confuses me - considering the fields arent necessarily constants. I'll give an example
If we call the class Bear, the 4 fields may be: name, type, nickname, homeZoo. Note all the fields are of the same type.
I need to have methods setname(string) getname() etc.
On top of my confusion with enum, I also have to be able to pass the set value of one of the fields to an interface - would I have to implement the interface on bear? Or is there some way to give the value to a method in the interfeace since an enum is a public static final sort of thing.
Your help is appreciated!