Advertisement
Guest User

Item

a guest
Dec 11th, 2019
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1.  
  2. /**
  3.  *
  4.  * @author maisiepie
  5.  */
  6. public class Item {
  7.  
  8.     public String name;
  9.     public int itemNumber;
  10.     public int qty;
  11.     public double price;
  12.     public Item next;
  13.  
  14.     public Item(String name, int itemNumber, int qty, double price) {
  15.  
  16.         this.name = name;
  17.         this.itemNumber = itemNumber;
  18.         this.qty = qty;
  19.         this.price = price;
  20.     }
  21.  
  22.     public void displayItem() {
  23.  
  24.         System.out.println(name + " " + itemNumber + " " + qty + " " + price);
  25.         System.out.println();
  26.     }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement