Last active
February 2, 2019 10:49
-
-
Save sfmishra/c84de5d5384036141b24b00b0c71b76a 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 Controller, contains instance variable, constructor. | |
* Abstract class cannot be instantiated and contains one abstract method. | |
*/ | |
public abstract class AbstractController { | |
public Integer result; | |
public Integer getresult() { | |
if(result != null) { | |
return result; | |
} else { | |
return null; | |
} | |
} | |
public void setResult(Integer result) { | |
this.result = result; | |
} | |
public AbstractController() { | |
system.debug(' Abstract constructor called '); | |
} | |
// this method needs to be implemented by all class extending this | |
public abstract Integer calculate(Integer val1, Integer val2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment