Facebook
From Soft Pelican, 6 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 217
  1. /**
  2.  * Created by Vectorq on 25.04.2017.
  3.  */
  4.  
  5. public class Produkt {
  6.  
  7.     private String nazwa;
  8.     private int ilosc;
  9.     private double kalorie;
  10.     private double bialko;
  11.     private double wegle;
  12.     private double tluszcze;
  13.     private List<String> Produkty = new ArrayList<>;
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.     public void Dodaj(string n, int i, double k, double b, double w, double t)
  22.     {
  23.         this.n=nazwa;
  24.         this.i=ilosc;
  25.         this.k=kalorie;
  26.         this.b=bialko;
  27.         this.w=wegle;
  28.         this.t=tluszcze;
  29.  
  30.         Produkty.add(n,i,k,b,w,t);
  31.  
  32.     }
  33.  
  34.  
  35.     public String Wyświetl(string n, int i, double k, double b, double w, double t)
  36.     {
  37.         this.n=nazwa;
  38.         this.i=ilosc;
  39.         this.k=kalorie;
  40.         this.b=bialko;
  41.         this.w=wegle;
  42.         this.t=tluszcze;
  43.  
  44.         for(int i = 0; i<Produkty.size(); i++)
  45.         {
  46.             String zmienna = Produkty.get(i);
  47.             return zmienna;
  48.         }
  49.  
  50.  
  51.     }
  52. }
  53.