Advertisement
rupek1995

MAIN JAVA ZIOMEK

Mar 16th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. package main;
  2.  
  3. import figury.Prostokat;
  4.  
  5. public class Testowa {
  6.     public static void main(String[] args) {
  7.         Prostokat p1;
  8.         Prostokat p2;
  9.        
  10.         //Tworzenie prostokatow
  11.         p1 = new Prostokat();
  12.         p2 = new Prostokat(0, 0, 2, 0, 2, 2, 0, 2);
  13.         //Obliczenie pola
  14.         System.out.println("Pole p1 to: " + p1.podajPole());
  15.         System.out.println("Pole p2 to: " + p2.podajPole());
  16.        
  17.         //Wyrysowanie figur
  18.         p1.rysuj();
  19.         p2.rysuj();
  20.     }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement