Advertisement
Fhernd

Guitar.java

Jun 10th, 2012
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. public class Guitar {
  2.  
  3.   private String serialNumber;
  4.   private double price;
  5.   GuitarSpec spec;
  6.  
  7.   public Guitar(String serialNumber, double price,
  8.                 GuitarSpec specs) {
  9.     this.serialNumber = serialNumber;
  10.     this.price = price;
  11.     this.spec = specs;
  12.   }
  13.  
  14.   public String getSerialNumber() {
  15.     return serialNumber;
  16.   }
  17.  
  18.   public double getPrice() {
  19.     return price;
  20.   }
  21.  
  22.   public void setPrice(float newPrice) {
  23.     this.price = newPrice;
  24.   }
  25.  
  26.   public GuitarSpec getSpec() {
  27.     return spec;
  28.   }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement