alvsjo

test klasa (15-02-17)

Feb 22nd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. import java.awt.Color;
  2.  
  3.  
  4. public class Test {
  5.  
  6.     public static void main(String[] args) {
  7.         // TODO Auto-generated method stub
  8.  
  9.         Tacka t1 = new Tacka (0,0,"Origin");
  10.         Tacka t2 = new Tacka(-3,4,"A1");
  11.         t1.stampa(true);
  12.    
  13.     /*  t2.x=-3;
  14.         t2.y=4;
  15.     */  t2.setIme("plj");
  16.         t2.stampa(true);
  17.         System.out.println(t1.dist(t2));
  18.    
  19.         ObojenaTacka t3= new ObojenaTacka(1, 2, "B1", Color.BLUE);
  20.         t3.stampa(true);
  21.         System.out.println(t3);
  22.         //System.out.println(t3.toString());
  23.        
  24.         Tacka3D t4= new Tacka3D(3, 4, 5, "C1");
  25.         Tacka3D t5= new Tacka3D(0, 0, 5, "C2");
  26.         System.out.println(t4.dist(t5));
  27.    
  28.     }
  29.  
  30. }
Add Comment
Please, Sign In to add comment