Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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 here: 8 6 3 1 1 -9 7 5 4 -2 0 2 Write a complete Java program. The default constructor should set a note to a middle C guarter note Include methods to set a note to a specified length and value. Write methods to retrieve information about a note, including methods to tell your - - a) The letter of the note (A, B, C, 6) 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.te calculate the frequency, use the formula: 440 2/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

Step: 3

blur-text-image

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

c. What were the reasons for their move? Did they come voluntarily?

Answered: 1 week ago

Question

5. How do economic situations affect intergroup relations?

Answered: 1 week ago