Homework Solution: hi, can i get help with this two methods in java…

    hi, can i get help with this two methods in java this are the class variables public class Note { /** Static Constants */ public static final int DEFAULT_INTENSITY = 50; public static final int REST_PITCH = 128; // First illegal pitch, used for rests. private static final int PITCHES_PER_OCTAVE = 12; private static final String[] NOTE_LETTERS = {"c","c#","d","d#","e","f","f#","g","g#","a","a#","b"}; private static final double MIN_DURATION = 1.0/64, // One sixty-fourth MAX_DURATION = 8.0; // Eight whole notes /** Fields (Immutable) */ private final String pitch="f6"; private final int midiValue=42; private final double duration=0.02; /** * Returns a (new) note with the same duration, but transposed by the given interval. * * @param interval the interval to transpose by * @throws IllegalArgumentException if note is transposed beyond valid bounds [c0, g10] * @return the transposed note */ public Note transpose(int interval) { // TODO return null; } /** * Returns a string representation of this Note. * It should follow the format found in songs/InMyLife.song, namely: * For a Note with pitch "g#4" and duration 1.0625 -> "g#4 x 1.0625" * NB1: Identical spacing and format are important! * NB2: For a "rest" note, the same format must be used (including duration). * * @return the string representation */ @Override public String toString() { // TODO return null; }

    Expert Answer

     
    package com; public class Note {

    hi, can i procure succor with this couple methods in java

    this are the adjust variables

    public adjust Voice {

    /** Static Constants */

    public static conclusive int DEFAULT_INTENSITY = 50;

    public static conclusive int REST_PITCH = 128; // First illicit shake, used for rests.

    private static conclusive int PITCHES_PER_OCTAVE = 12;

    private static conclusive String[] NOTE_LETTERS = {“c”,”c#”,”d”,”d#”,”e”,”f”,”f#”,”g”,”g#”,”a”,”a#”,”b”};

    private static conclusive inclose MIN_DURATION = 1.0/64, // One sixty-fourth

    MAX_DURATION = 8.0; // Eight healthy voices

    /** Fields (Immutable) */

    private conclusive String shake=”f6″;

    private conclusive int midiValue=42;

    private conclusive inclose continuance=0.02;

    /**

    * Returns a (new) voice with the selfselfcorresponding continuance, except reversed by the dedicated cessation.

    *

    * @param cessation the cessation to reverse by

    * @throws IllicitArgumentException if voice is reversed more strong boundary [c0, g10]

    * @return the reversed voice

    */

    public Voice reverse(int cessation) {

    // TODO

    return null;

    }

    /**

    * Returns a string fidelity of this Voice.

    * It should ensue the format set-up in dittys/InMyLife.song, namely:

    * For a Voice with shake “g#4” and continuance 1.0625 -> “g#4 x 1.0625”

    * NB1: Identical spacing and format are important!

    * NB2: For a “rest” voice, the selfselfcorresponding format must be used (including continuance).

    *

    * @return the string fidelity

    */

    @Override

    public String toString() {

    // TODO

    return null;

    }

    Expert Counterpart

     

    package com;

    public adjust Voice {

    /** Static Constants */

    public static conclusive int DEFAULT_INTENSITY = 50;

    public static conclusive int REST_PITCH = 128; // First illicit shake, used for rests.

    private static conclusive int PITCHES_PER_OCTAVE = 12;

    private static conclusive String[] NOTE_LETTERS = {“c”,”c#”,”d”,”d#”,”e”,”f”,”f#”,”g”,”g#”,”a”,”a#”,”b”};

    private static conclusive inclose MIN_DURATION = 1.0/64, // One sixty-fourth

    MAX_DURATION = 8.0; // Eight healthy voices

    /** Fields (Immutable) */

    private conclusive String shake=”f6″;

    private conclusive int midiValue=42;

    private conclusive inclose continuance=0.02;

    /**

    * Returns a (new) voice with the selfselfcorresponding continuance, except reversed by the dedicated cessation.

    *

    * @param cessation the cessation to reverse by

    * @throws IllicitArgumentException if voice is reversed more strong boundary [c0, g10]

    * @return the reversed voice

    */

    public Voice reverse(int cessation) {

    // TODO

    return null;

    }

    /**

    * Returns a string fidelity of this Voice.

    * It should ensue the format set-up in dittys/InMyLife.song, namely:

    * For a Voice with shake “g#4” and continuance 1.0625 -> “g#4 x 1.0625”

    * NB1: Identical spacing and format are important!

    * NB2: For a “rest” voice, the selfselfcorresponding format must be used (including continuance).

    *

    * @return the string fidelity

    */

    @Override

    public String toString() {

    // TODO

    return null;

    }

    }