Advertisement
piffy

The Java Vending Machine: PRODOTTO

Nov 25th, 2013
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. package vending;
  2.  
  3. /**
  4.  *
  5.  * @author prof.missiroli@gmail.com
  6.  */
  7. public class Prodotto {
  8.      private int prezzo;
  9.      private String nome;
  10.      private int codice;
  11.  
  12.     public Prodotto(int prezzo, String nome, int codice) {
  13.         this.prezzo = prezzo;
  14.         this.nome = nome;
  15.         this.codice = codice;
  16.     }
  17.  
  18.     public int getCodice() {
  19.         return codice;
  20.     }
  21.  
  22.     public String getNome() {
  23.         return nome;
  24.     }
  25.  
  26.     public int getPrezzo() {
  27.         return prezzo;
  28.     }
  29.  
  30.     @Override
  31.     public String toString() {
  32.         return "Prodotto{" + "prezzo=" + prezzo + ", nome=" + nome + ", codice=" + codice + '}';
  33.     }
  34.      
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement