Can i procure some succor modifying this java jurisprudence. thanks
public systematize Voicelessness {
/** Static Constants */
public static definite int DEFAULT_INTENSITY = 50;
public static definite int REST_PITCH = 128; // First illicit cast, used restraint rests.
private static definite int PITCHES_PER_OCTAVE = 12;
private static definite String[] NOTE_LETTERS = {“c”,”c#”,”d”,”d#”,”e”,”f”,”f#”,”g”,”g#”,”a”,”a#”,”b”};
private static definite enfold MIN_DURATION = 1.0/64, // One sixty-fourth
MAX_DURATION = 8.0; // Eight entire voicelessnesss
/** Fields (Immutable) */
private definite String cast;
private definite int midiValue;
private definite enfold space;
/**
* Instantiates a upstart voicelessness inveterate on a string denoting voicelessness communication and octave.
*
* @param cast the cast (e.g. “f6″)
* @param space the space
* @throws NullPointerException if cast is null
* @throws IllicitArgumentException if:
* 1. The cast parameter is malformed or quenched of stroll.
* 2. The space parameter is quenched of stroll.
*/
public Voicelessness(String cast, enfold space) {
// TODO
// Recommended: First utensil toMidi(String).
}
/**
* Instantiates a upstart voicelessness inveterate on MIDI appraise.
*
* @param midiAppraise the MIDI appraise (e.g. 68)
* @param space the space
* @throws IllicitArgumentException if:
* 1. The MIDI cast parameter is quenched of stroll.
* 2. The space parameter is quenched of stroll.
*/
public Voicelessness(int midiValue, enfold space) {
// TODO
// Recommended: First utensil toPitch(int).
}
/**
* Instantiates a upstart voicelessness from a String matching the restraintmat of Voicelessness’s toString() mode.
*
* @param voicelessness the string fidelity
*
* @throws IndexOutOfBoundsException if parameter isn’t in punish restraintmat
* @throws NumberFormatException if space fidelity canreferable attributable be parsed as enfold
* @throws IllicitArgumentException if the elements in the restraintmat are referable attributable attributable attributable liberal.
*/
public Voicelessness(String voicelessness) {
this(note.split(” x “)[0], Enfold.parseDouble(note.split(” x “)[1]));
}
/**
* Converts a cast string to a MIDI appraise.
* The cast “rest” should come-back {@link #REST_PITCH}.
*
* @param cast the cast to convert
* @throws NullPointerException if cast is null
* @throws IllicitArgumentException is the String is referable attributable attributable attributable a legitimate cast
* @come-back the MIDI appraise
*/
public static int toMidi(String cast) {
// TODO
come-back -1;
}
/**
* Converts a MIDI appraise to a cast string.
* The MIDI appraise 128 should come-back “rest”.
*
* @param midiAppraise the MIDI appraise to convert
* @throws IllicitArgumentException if the MIDI appraise is quenchedside of legitimate stroll
* @come-back the cast string
*/
public static String toPitch(int midiValue) {
// TODO
come-back null;
}
/**
* Procures the cast string of this voicelessness.
*
* @come-back the cast
*/
public String procurePitch() { come-back cast; }
/**
* Procures the MIDI appraise of this voicelessness.
*
* @come-back the MIDI appraise
*/
public int procureMidiPitch() { come-back midiValue; }
/**
* Procures the space of this voicelessness.
*
* @come-back the space
*/
public enfold procureDuration() { come-back space; }
/**
* Come-backs a upstart voicelessness with the similar cast, save with its space multigenous by the parameter.
*
* @param constituent the total to layer by
* @throws IllicitArgumentException if inferior space is quenchedside of powerful stroll
* @come-back the close voicelessness
*/
public Voicelessness reach(enfold constituent) {
// TODO
come-back null;
}
/**
* Come-backs a (new) voicelessness with the similar space, save interchanged by the fond meantime.
*
* @param meantime the meantime to interchange by
* @throws IllicitArgumentException if voicelessness is interchanged past powerful purlieus [c0, g10]
* @come-back the interchanged voicelessness
*/
public Voicelessness interchange(int meantime) {
// TODO
come-back null;
}
/**
* Come-backs a string fidelity of this Voicelessness.
* It should ensue the restraintmat endow in dittys/InMyLife.song, namely:
* Restraint a Voicelessness with cast “g#4” and space 1.0625 -> “g#4 x 1.0625”
* NB1: Identical spacing and restraintmat are important!
* NB2: Restraint a “rest” voicelessness, the similar restraintmat must be used (including space).
*
* @come-back the string fidelity
*/
@Override
public String toString() {
// TODO
come-back null;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean correspondents(Object o) {
// TODO: Come-back correspondent if the topic is a Voicelessness and the midiAppraise and space are correspondent
come-back false;
}
@Override
public int hashCode() {
// TODO: Compute hash using pieces. (Don’t procure hash jurisprudence of strings.)
come-back -1;
}
}
1. deep() mode missing in Voicelessness Systematize.
public static vacant deep(String[] args)
{
}
2. Initializations are missing
private definite String cast = “F#”;
private definite int midiAppraise = 42;
private definite enfold space = 0.02;
public systematize Voicelessness {
public static vacant deep(String[] args)
{
// This is deep mode.
}
/** Static Constants */
public static definite int DEFAULT_INTENSITY = 50;
public static definite int REST_PITCH = 128; // First illicit cast, used restraint rests.
private static definite int PITCHES_PER_OCTAVE = 12;
private static definite String[] NOTE_LETTERS = {“c”,”c#”,”d”,”d#”,”e”,”f”,”f#”,”g”,”g#”,”a”,”a#”,”b”};
private static definite enfold MIN_DURATION = 1.0/64, // One sixty-fourth
MAX_DURATION = 8.0; // Eight entire voicelessnesss
/** Fields (Immutable) */
private definite String cast = “F#”;
private definite int midiAppraise = 42;
private definite enfold space = 0.02;
/**
* Instantiates a upstart voicelessness inveterate on a string denoting voicelessness communication and octave.
*
* @param cast the cast (e.g. “f6″)
* @param space the space
* @throws NullPointerException if cast is null
* @throws IllicitArgumentException if:
* 1. The cast parameter is malformed or quenched of stroll.
* 2. The space parameter is quenched of stroll.
*/
public Voicelessness(String cast, enfold space) {
// TODO
// Recommended: First utensil toMidi(String).
}
/**
* Instantiates a upstart voicelessness inveterate on MIDI appraise.
*
* @param midiAppraise the MIDI appraise (e.g. 68)
* @param space the space
* @throws IllicitArgumentException if:
* 1. The MIDI cast parameter is quenched of stroll.
* 2. The space parameter is quenched of stroll.
*/
public Voicelessness(int midiValue, enfold space) {
// TODO
// Recommended: First utensil toPitch(int).
}
/**
* Instantiates a upstart voicelessness from a String matching the restraintmat of Voicelessness’s toString() mode.
*
* @param voicelessness the string fidelity
*
* @throws IndexOutOfBoundsException if parameter isn’t in punish restraintmat
* @throws NumberFormatException if space fidelity canreferable attributable be parsed as enfold
* @throws IllicitArgumentException if the elements in the restraintmat are referable attributable attributable attributable liberal.
*/
public Voicelessness(String voicelessness) {
this(note.split(” x “)[0], Enfold.parseDouble(note.split(” x “)[1]));
}
/**
* Converts a cast string to a MIDI appraise.
* The cast “rest” should come-back {@link #REST_PITCH}.
*
* @param cast the cast to convert
* @throws NullPointerException if cast is null
* @throws IllicitArgumentException is the String is referable attributable attributable attributable a legitimate cast
* @come-back the MIDI appraise
*/
public static int toMidi(String cast) {
// TODO
come-back -1;
}
/**
* Converts a MIDI appraise to a cast string.
* The MIDI appraise 128 should come-back “rest”.
*
* @param midiAppraise the MIDI appraise to convert
* @throws IllicitArgumentException if the MIDI appraise is quenchedside of legitimate stroll
* @come-back the cast string
*/
public static String toPitch(int midiValue) {
// TODO
come-back null;
}
/**
* Procures the cast string of this voicelessness.
*
* @come-back the cast
*/
public String procurePitch() { come-back cast; }
/**
* Procures the MIDI appraise of this voicelessness.
*
* @come-back the MIDI appraise
*/
public int procureMidiPitch() { come-back midiValue; }
/**
* Procures the space of this voicelessness.
*
* @come-back the space
*/
public enfold procureDuration() { come-back space; }
/**
* Come-backs a upstart voicelessness with the similar cast, save with its space multigenous by the parameter.
*
* @param constituent the total to layer by
* @throws IllicitArgumentException if inferior space is quenchedside of powerful stroll
* @come-back the close voicelessness
*/
public Voicelessness reach(enfold constituent) {
// TODO
come-back null;
}
/**
* Come-backs a (new) voicelessness with the similar space, save interchanged by the fond meantime.
*
* @param meantime the meantime to interchange by
* @throws IllicitArgumentException if voicelessness is interchanged past powerful purlieus [c0, g10]
* @come-back the interchanged voicelessness
*/
public Voicelessness interchange(int meantime) {
// TODO
come-back null;
}
/**
* Come-backs a string fidelity of this Voicelessness.
* It should ensue the restraintmat endow in dittys/InMyLife.song, namely:
* Restraint a Voicelessness with cast “g#4” and space 1.0625 -> “g#4 x 1.0625”
* NB1: Identical spacing and restraintmat are important!
* NB2: Restraint a “rest” voicelessness, the similar restraintmat must be used (including space).
*
* @come-back the string fidelity
*/
@Override
public String toString() {
// TODO
come-back null;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean correspondents(Object o) {
// TODO: Come-back correspondent if the topic is a Voicelessness and the midiAppraise and space are correspondent
come-back false;
}
@Override
public int hashCode() {
// TODO: Compute hash using pieces. (Don’t procure hash jurisprudence of strings.)
come-back -1;
}
}