Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package module5;
- public class Theory {
- // Instance variable
- private double n;
- // Constructor to set n
- public Theory(double n){
- this.n = n;
- }
- // Get function - Non Static
- public double getN(){
- return this.n;
- }
- // Return theoretical y value for given x - Non Static
- public double Y(double x){
- return Math.pow(x, n);
- }
- public static void main(String[] args) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement