Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. /**
  2.  *
  3.  * @author Martin Silén
  4.  * @version 4
  5.  */
  6. public class Item {
  7.  
  8.    
  9.     private String type, pris;
  10.     private int price;
  11.  
  12.    
  13.     public Item(String type, int price){
  14.         this.type=type;
  15.         this.price=price;
  16.      }
  17.  
  18.    
  19.     @Override
  20.     public String toString(){
  21.         pris=String.valueOf(price);
  22.         return  type+" "+pris+"€";
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement