• entries
208
383
• views
65971

# Extend vs Implement

92 views

For my event system I have a base class that looks like this:
public class jtEvent {   private JavaTactics j;//HERE FOR REFERENCE   public int ID;//ID CONFIGURED BY THE TRACKER   public jtEvent(JavaTactics j, int id) {      this.j = j;      this.ID = id;   }   public void activate() {      j.log.add("Activated Event: "+this.ID);   }}

And then when I want to create a new event I just extend it and overwrite the activate() method. However if I made this an abstract class I could just write this as an abstract class and implement it in each of the events that I want to use it on.

SO, what should I use? Extend the jtEvent class or make it an abstract class?

There are no comments to display.

## Create an account

Register a new account