-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPercussion.java
More file actions
33 lines (29 loc) · 912 Bytes
/
Percussion.java
File metadata and controls
33 lines (29 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* An abstract class named Percussion that extencd from the Instrument
* @author Alizain Charania
* @version 1.0 Oct. 12 2015
*/
public abstract class Percussion extends Instrument {
private String property;
/**
* This is a constructor for the Percussion class
* @param price The cost price of each instrument
* @param property The unique property of percussion instruments
*/
public Percussion(double price, String property) {
super(price);
this.property = property;
}
/**
* An abstract method to be implemented in the subclasses
* @return a String that makes the sound of that specific instrument
*/
public abstract String play();
/**
* A getter method for the instance variable property
* @return a String of its property
*/
public String getProperty() {
return property;
}
}