KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > test > freeformlib > Multiplier


1 /*
2  * Multiplier.java
3  *
4  * Created on 07 January 2005, 15:46
5  */

6
7 package org.netbeans.test.freeformlib;
8
9 /**
10  *
11  * @author Administrator
12  */

13 public class Multiplier {
14     
15     private double x = 0;
16     private double y = 1;
17     
18     
19     /** Creates a new instance of Multiplier */
20     public Multiplier() {
21     }
22     
23     public Multiplier(double x, double y) {
24         this.x = x;
25         this.y = y;
26     }
27     
28     public double getMultiplication() {
29         return x*y;
30     }
31     
32     
33     public double getX() {
34         return x;
35     }
36     public void setX(double x) {
37         this.x = x;
38     }
39     
40     public double getY() {
41         return y;
42     }
43     public void setY(double y) {
44         this.y = y;
45     }
46 }
47
Popular Tags