Advertisement
blackpab

gsdgsdfgdsgsd

Apr 10th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. package pilka;
  2.  
  3. public class Pilka implements Odbijanie{
  4. @Override
  5. public void odbijaj() {
  6. System.out.print("Bum bum\n");
  7. }
  8.  
  9. @Override
  10. public void czestoscOdbijania(float czestosc) {
  11. for(int i=0; i<czestosc; i++) {
  12. System.out.print(i+1+":");
  13. odbijaj();
  14. }
  15. }
  16.  
  17. public static void main(String[] args) {
  18. Pilka p1 = new Pilka();
  19. p1.czestoscOdbijania(5);
  20. p1.odbijaj();
  21. }
  22. }
  23.  
  24.  
  25. //--------------------------------------------
  26.  
  27. package pilka;
  28.  
  29. public interface Odbijanie {
  30.  
  31. public void odbijaj();
  32. public void czestoscOdbijania(float czestosc);
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement