Design , implement and test a class that can be used to hold information about a musical note. Test it with an appropriate driver program. DESIGN REQUIREMENTS A programmer MUSTbe 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, eight note, quarter note, half note, or a whole note. The note's value is an integer. it is specified by counting how far the note lies above or below the A note that orchestras use in tuning ( https://en.wikipedia.org/wiki/A440_(pitch_standard) if needed to check ) . In counting "how far", you should count every key, both the white and black notes on a piano. So the A note above middle C would have a value of 0. The A note one octave above that would have a value of 12. The default constructor should set a note to a A440 (an A note of frequency 440Hz) quarter note. Include methods to set a note to a specified length and value. Write methods to retrieve information about a note, including methods to: 1. tell you the letter name of the note (A, B , C); 2. tell you whether the note is natural or sharp (ie. white or black on the piano), and 3. tell you the frequency of the note in hertz. [[ HINT: To calculate the frequency, use the formula 440 x 2^(n/12) where n is the note number. ]] Feel free to create other useful methods ! No GUI interface or applet is required but the problem might extend itself to a cute applet in some way... You are encouraged to explore ! TESTING and DOCUMENTATION Be sure to test, and show me the results. Document (with javadoc) and comment the code. RESOURCES If you are new to keyboards use this link ( http://harmoniumnet.harmoniumvereniging.nl If needed the check ) to get a simple picture of a keyboard and a quick explanation of an octave. Then just assign 0 to the A note and give each note (white or black) above or below that the next consecutive integer. You may need to do some research to understand fully what the client is asking for - that is common! You may also extend this assignment by actually making a method to have the note sound a tone, to assign it a specific MIDI voice (piano or guitar), or develop a visual interaface. All great extensions!

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Design , implement and test a class that can be used to hold information
about a musical note. Test it with an appropriate driver program.
DESIGN REQUIREMENTS
A programmer MUSTbe 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, eight note, quarter note, half
note, or a whole note.
The note's value is an integer. it is specified by counting
how far the note lies above or below the A note that orchestras
use in tuning
( https://en.wikipedia.org/wiki/A440_(pitch_standard) if
needed to check )
. In counting "how far", you should count every key, both
the white and black notes on a piano. So the A note above
middle C would have a value of 0. The A note one octave
above that would have a value of 12.
The default constructor should set a note to a A440 (an A
note of frequency 440Hz) quarter note. Include methods to
set a note to a specified length and value. Write methods
to retrieve information about a note, including methods to:
1. tell you the letter name of the note (A, B , C);
2. tell you whether the note is natural or sharp (ie. white or black on
the piano), and
3. tell you the frequency of the note in hertz. [[ HINT: To
calculate the frequency, use the formula 440 x 2^(n/12)
where n is the note number. ]]
Feel free to create other useful methods ! No GUI
interface or applet is required but the problem might
extend itself to a cute applet in some way... You are
encouraged to explore !

TESTING and DOCUMENTATION
Be sure to test, and show me the results.
Document (with javadoc) and comment the code.
RESOURCES
If you are new to keyboards use this link (
http://harmoniumnet.harmoniumvereniging.nl
If needed the check )
to get a simple picture of a keyboard and a quick
explanation of an octave. Then just assign 0 to the A note
and give each note (white or black) above or below that
the next consecutive integer. You may need to do some
research to understand fully what the client is asking for -
that is common! You may also extend this assignment by
actually making a method to have the note sound a tone,
to assign it a specific MIDI voice (piano or guitar), or
develop a visual interaface. All great extensions!

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY