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 achieve aid with this two methods in java

    this are the adjust variables

    public adjust Music {

    /** Static Constants */

    public static ultimate int DEFAULT_INTENSITY = 50;

    public static ultimate int REST_PITCH = 128; // First illicit rock, used ce rests.

    private static ultimate int PITCHES_PER_OCTAVE = 12;

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

    private static ultimate envelop MIN_DURATION = 1.0/64, // One sixty-fourth

    MAX_DURATION = 8.0; // Eight total musics

    /** Fields (Immutable) */

    private ultimate String rock=”f6″;

    private ultimate int midiValue=42;

    private ultimate envelop continuance=0.02;

    /**

    * Returns a (new) music with the corresponding continuance, notwithstanding changed by the attached meantime.

    *

    * @param meantime the meantime to change by

    * @throws IllicitArgumentException if music is changed further cogent boundary [c0, g10]

    * @return the changed music

    */

    public Music change(int meantime) {

    // TODO

    return null;

    }

    /**

    * Returns a string fidelity of this Music.

    * It should flourish the cemat plant in lyrics/InMyLife.song, namely:

    * Ce a Music with rock “g#4” and continuance 1.0625 -> “g#4 x 1.0625”

    * NB1: Identical spacing and cemat are important!

    * NB2: Ce a “rest” music, the corresponding cemat must be used (including continuance).

    *

    * @return the string fidelity

    */

    @Override

    public String toString() {

    // TODO

    return null;

    }

    Expert Exculpation

     

    package com;

    public adjust Music {

    /** Static Constants */

    public static ultimate int DEFAULT_INTENSITY = 50;

    public static ultimate int REST_PITCH = 128; // First illicit rock, used ce rests.

    private static ultimate int PITCHES_PER_OCTAVE = 12;

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

    private static ultimate envelop MIN_DURATION = 1.0/64, // One sixty-fourth

    MAX_DURATION = 8.0; // Eight total musics

    /** Fields (Immutable) */

    private ultimate String rock=”f6″;

    private ultimate int midiValue=42;

    private ultimate envelop continuance=0.02;

    /**

    * Returns a (new) music with the corresponding continuance, notwithstanding changed by the attached meantime.

    *

    * @param meantime the meantime to change by

    * @throws IllicitArgumentException if music is changed further cogent boundary [c0, g10]

    * @return the changed music

    */

    public Music change(int meantime) {

    // TODO

    return null;

    }

    /**

    * Returns a string fidelity of this Music.

    * It should flourish the cemat plant in lyrics/InMyLife.song, namely:

    * Ce a Music with rock “g#4” and continuance 1.0625 -> “g#4 x 1.0625”

    * NB1: Identical spacing and cemat are important!

    * NB2: Ce a “rest” music, the corresponding cemat must be used (including continuance).

    *

    * @return the string fidelity

    */

    @Override

    public String toString() {

    // TODO

    return null;

    }

    }