public class ABCInstrument
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name
The name of the instrument
|
private int |
value
The integer value associated with the instrument.
|
Constructor and Description |
---|
ABCInstrument(java.lang.String name,
int value)
Constructor for the class
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Accessor for the name of the instrument
|
int |
getValue()
Accessor for the integer value associated with this instrument.
|
java.lang.String |
toString()
Returns the string representation of this class
|
private java.lang.String name
private int value
public ABCInstrument(java.lang.String name, int value)
name
- the name of the instrumentvalue
- the instrument's associated integer valuepublic java.lang.String getName()
public int getValue()
public java.lang.String toString()
toString
in class java.lang.Object