KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * TestMain2.java
3  *
4  * Created on June 17, 2004, 11:52 AM
5  */

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

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