Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main;
- import figury.Prostokat;
- public class Testowa {
- public static void main(String[] args) {
- Prostokat p1;
- Prostokat p2;
- //Tworzenie prostokatow
- p1 = new Prostokat();
- p2 = new Prostokat(0, 0, 2, 0, 2, 2, 0, 2);
- //Obliczenie pola
- System.out.println("Pole p1 to: " + p1.podajPole());
- System.out.println("Pole p2 to: " + p2.podajPole());
- //Wyrysowanie figur
- p1.rysuj();
- p2.rysuj();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement