Access over 20 million homework & study documents

Guitar

Content type
User Generated
Subject
Computer Science
Type
Homework
Rating
Showing Page:
1/4
public class Guitar {
private final int YEAR=2015;
private final String name="Guitar";
private final String purpose="Music";
private String model;
private int numTuners;
private int numBridgePins;
private int radSoundHole;
private String type;
private int numFrets;
private double price;
private String ownner;
private String manufacturer;
public Guitar(String model) {
this.model=model;
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public int getNumTuners() {
return numTuners;
}
public void setNumTuners(int numTuners) {
this.numTuners = numTuners;
}
public int getNumBridgePins() {
return numBridgePins;
}
public void setNumBridgePins(int numBridgePins) {
this.numBridgePins = numBridgePins;
}
public int getRadSoundHole() {
return radSoundHole;
}
public void setRadSoundHole(int radSoundHole) {
this.radSoundHole = radSoundHole;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public int getNumFrets() {
return numFrets;
}
public void setNumFrets(int numFrets) {
this.numFrets = numFrets;
}
public double getPrice() {

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/4
return price;
}
public void setPrice(double price) {
this.price = price;
}
public String getOwnner() {
return ownner;
}
public void setOwnner(String ownner) {
this.ownner = ownner;
}
public void tune()
{
System.out.println("Tuning");
}
public void sellTo(String name)
{
System.out.println(this.ownner+" Sold to "+ name);
this.setOwnner(name);
}
public void playGuitar()
{
System.out.println("Guitar is being played");
}
public String getManufacturer() {
return manufacturer;
}
public void setManufacturer(String manufacturer) {
this.manufacturer = manufacturer;
}
//toString method
@Override
public String toString() {
return "Guitar [YEAR=" + YEAR + ", name=" + name + ", purpose=" +
purpose + ", model=" + model + ", numTuners="
+ numTuners + ", numBridgePins=" + numBridgePins + ",
radSoundHole=" + radSoundHole + ", type=" + type
+ ", numFrets=" + numFrets + ", price=" + price + ",
ownner=" + ownner + ", manufacturer="
+ manufacturer + "]";
}
}

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/4

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 4 pages?
Access Now
Unformatted Attachment Preview
public class Guitar { private final int YEAR=2015; private final String name="Guitar"; private final String purpose="Music"; private String model; private int numTuners; private int numBridgePins; private int radSoundHole; private String type; private int numFrets; private double price; private String ownner; private String manufacturer; public Guitar(String model) { this.model=model; } public String getModel() { return model; } public void setModel(String model) { this.model = model; } public int getNumTuners() { return numTuners; } public void setNumTuners(int numTuners) { this.numTuners = numTuners; } public int getNumBridgePins() { return numBridgePins; } public void setNumBridgePins(int numBridgePins) { this.numBridgePins = numBridgePins; } public int getRadSoundHole() { return radSoundHole; } public void setRadSoundHole(int radSoundHole) { this.radSoundHole = radSoundHole; } public String getType() { return type; } public void setType(String type) { this.type = type; } public int getNumFrets() { return numFrets; } public void setNumFrets(int numFrets) { this.numFrets = numFrets; } public double getPrice() { return price; } public void setPrice(double price) { this.price = p ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Great! 10/10 would recommend using Studypool to help you study.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4