D:\CurrentProjects\SearsInterviewCode\src\java\calc_value_power_using_node\ValuePowerDataObject.java
 1 /*
 2  * To change this template, choose Tools | Templates
 3  * and open the template in the editor.
 4  */
 5 
 6 package calc_value_power_using_node;
 7 
 8 /**
 9  *
10  * @author sameldin
11  */
12 public class ValuePowerDataObject
13 {
14     private double value_X = 0;
15     private double power_Y = 1;
16     double calculatedValue = 0;
17 
18 //    public ValuePowerDO(double passedValue_X, double passedPower_Y)
19     public ValuePowerDataObject()
20     {
21 
22     }
23     /*
24      *
25      */
26     public double calculateX2Y(double passedvalue_X, double passedValue_Y)
27     {
28         this.calculatedValue = passedvalue_X;
29         for(int loop = 1; loop < passedValue_Y; loop++)
30             this.calculatedValue = this.calculatedValue * passedvalue_X;
31         return(this.calculatedValue);
32     }
33     public double calculateX2Y()
34     {
35         this.calculatedValue = this.value_X;
36         for(int loop = 1; loop < this.power_Y; loop++)
37             this.calculatedValue = this.calculatedValue * this.value_X;
38         return(this.calculatedValue);
39     }
40 
41     /**
42      * @return the value_X
43      */
44     public double getValue_X() {
45         return value_X;
46     }
47 
48     /**
49      * @param value_X the value_X to set
50      */
51     public void setValue_X(double value_X) {
52         this.value_X = value_X;
53     }
54 
55     /**
56      * @return the power_Y
57      */
58     public double getPower_Y() {
59         return power_Y;
60     }
61 
62     /**
63      * @param power_Y the power_Y to set
64      */
65     public void setPower_Y(double power_Y) {
66         this.power_Y = power_Y;
67     }
68 
69 }
70 
71