Advertisement
Guest User

Untitled

a guest
Apr 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1.  
  2. public class Drukarka {
  3. private UrzadzenieBiurowe uB=new UrzadzenieBiurowe();
  4.  
  5. public void wlaczone() {
  6. uB.wlaczone();
  7. }
  8.  
  9.  
  10. public void pracuje(int w) {
  11. uB.pracuje(w);
  12. }
  13.  
  14.  
  15. public void sprawne() {
  16. uB.sprawne();
  17. }
  18.  
  19. public static void main(String[] args) {
  20. int k=0;
  21. Drukarka d1= new Drukarka();
  22. for(int i=0; i<4; i++){
  23. d1.pracuje(k);
  24. if(k==0)
  25. k=1;
  26. else
  27. k=0;
  28. }
  29.  
  30. }
  31.  
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement