Created
June 7, 2018 18:53
-
-
Save jbiason/64f2c489bcc259fa55be685f131b191a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class BaseClass { | |
public static String getVersion() { | |
return "Unknown"; | |
} | |
public static String getGroup() { | |
return "Unknown"; | |
} | |
public static String getIdentifier() { | |
return getGroup() + getVersion(); | |
} | |
// instance stuff | |
} | |
class Class1 extends BaseClass { | |
public static String getVersion() { | |
return "1"; | |
} | |
public static String getGroup() { | |
return "Magic"; | |
} | |
// specialized Class1 stuff | |
} | |
class Class2 extends BaseClass { | |
public static String getVersion() { | |
return "2"; | |
} | |
public static String getGroup() { | |
return "Magic"; | |
} | |
// specialized stuff for Class2 now | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment