Advertisement
Morogn93

Untitled

Oct 29th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. package Pesel;
  2.  
  3. public class Gracz{
  4.     public static void main(String[] args) {
  5.        
  6.         Koszykowka p1 = new Koszykowka(10, 5);
  7.         System.out.println(p1.getIluNasGra());
  8.         System.out.println(p1.getDoIluGramy());
  9.     }
  10. }
  11.  
  12. class Koszykowka{
  13.     private int doIluGramy;
  14.     private int iluNasGra;
  15.     Koszykowka(int doIluGramy, int iluNasGra){
  16.         this.setDoIluGramy(doIluGramy);
  17.         this.setIluNasGra(iluNasGra);
  18.     }
  19.     public int getDoIluGramy() {
  20.         return doIluGramy;
  21.     }
  22.     public void setDoIluGramy(int doIluGramy) {
  23.         this.doIluGramy = doIluGramy;
  24.     }
  25.     public int getIluNasGra() {
  26.         return iluNasGra;
  27.     }
  28.     public void setIluNasGra(int iluNasGra) {
  29.         this.iluNasGra = iluNasGra;
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement