Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

. NoteADT - Show the interface and all abstract methods ass Show the following NoteDataStructureCl methods: default constructor, overloaded constructor, copy constructor, setValue (calls other

image text in transcribedimage text in transcribed

. NoteADT - Show the interface and all abstract methods ass Show the following NoteDataStructureCl methods: default constructor, overloaded constructor, copy constructor, setValue (calls other methods: setStrValue, setKeyColor setFrequency), setLength (calls setStrLength), setFrequency (should be double value- cast)setKeyColor, getValue, getLength, getkeyColor, getFrequency, toString. NoteClientDemoClass -Instantiate two Note objects using the overloaded constructor and two Note objects using the default constructor. A sample output for 1 Note object might appear like Length: Eighth note Value: -3 Black key (sharp) 369.995672 Hz 2. Specify, design, and implement a "Note" class that can be used to hold information about a musical note. A programmer should be able to set and retrieve the length of the note and the value of the note. The length of a note may be a sixteenth note, eighth note, quarter note, half note or whole note. A value is specified by indicating how far the note lies above or below the "A" note that orchestras use in tuning. In counting "how far," you should include both the white and black notes on a piano. For example, the note (value) numbers for the octave beginning at middle C are shown as integers h ere: Write a complete Java program The default constructor should set a note to a middle C quarter note. Include methods to set a note to a specified length and value. tell you: a) The letter of the note (A, B, C, ,6) - Write methods to retrieve information about a note, includinq methods to b) Whether the note is a natural (white key) or a sharp (black key) on the piano c) The frequency of a note in hertz. In order to calculate the frequency, use t he fo rmula: 440 2n/12, where n is the note number

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+1. What are neurons, and what are their three parts?

Answered: 1 week ago

Question

f. Did they change their names? For what reasons?

Answered: 1 week ago