Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1.  
  2. public class KreisIstPunkt extends PunktNeu {
  3.     private double r;
  4.     // Constructor
  5.     public KreisIstPunkt(double x, double y, double r) {
  6.         super(x, y);
  7.         this.r = r;
  8.     }
  9.     // Anstelle der 'anzeige()'
  10.     public String toString(){
  11.         String myString = String.valueOf(this.x) +", " + String.valueOf(this.y) + ", " + String.valueOf(this.r);
  12.         return myString;
  13.     }
  14.     public double getR() {
  15.         return r;
  16.     }
  17.     public void setR(double r) {
  18.         this.r = r;
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement