Guest User

Untitled

a guest
Dec 11th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1. package cz.muni.fi.pb162.project.geometry;
  2.  
  3.  
  4. /**
  5.  * Write a description of class Vertex2D here.
  6.  *
  7.  * @author (your name)
  8.  * @version (a version number or a date)
  9.  */
  10. public class Vertex2D
  11. {
  12.     // instance variables - replace the example below with your own
  13.     private double x;
  14.    
  15.     private double y;
  16.  
  17.  
  18.     public double getX() {      
  19.         return x;
  20.     }
  21.    
  22.     public double getY() {    
  23.         return y;
  24.     }
  25.    
  26.     public void setX(double x) {    
  27.         this.x = x;
  28.     }
  29.    
  30.     public void setY(double y) {    
  31.         this.y = y;
  32.     }
  33.  
  34.     public String toString() {
  35.        
  36.         return "["+x+", "+y+"]";  
  37.     }
  38.    
  39. }
Add Comment
Please, Sign In to add comment