Write methods to retrieve information about a note

Assignment Help JAVA Programming
Reference no: EM13702328

Question: Specify, design and implement a 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, eight notes, quarter note, half note, or a whole note.

A value is specified by indicating how far the note lies above or below the A note that orchestras use in tuning. V In counting "how far", you should include both the while and black notes on a piano.

You need to prepare 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.

- Write methods to retrieve information about a note, including methods to tell you the letter of the note (A, B , C)

   -  Whether the note is natural or sharp white or black on the piano, and the frequency of the note in hertz.

    - To calculate the frequency, use the formula 440 x 2^(n/12) where n is the note number.

You need to implement a class that will be used to hold information about a musical note.

Reference no: EM13702328

Questions Cloud

Describe how you would prepare a potassium nitrate solution : Question- Describe how you would prepare 465 ml of a .3550 M potassium nitrate solution starting with a) solid potassium nitrate b) 0.750 M potassium nitrate solution
Write a function to calculate tax : write a function to calculate tax, the sample output is : Filing Status (1) Single (2) Married (3) Head of Household (0)
Draw a state diagram that depicts a simple system : Draw a state diagram that depicts a simple system that stacks and unstuck a set of Russian "Matryoshka" dolls. Matryoshka dolls are hollow wooden dolls that can be separated in two parts, revealing a smaller doll inside
Calculate delta g for the balanced redox reaction : Use the tabulated half-cell potentials to calculate delta G for the following balanced redox reaction. Pb2+(aq) + Cu(s) --> Pb(s) + Cu2+(aq)
Write methods to retrieve information about a note : calculate the frequency, use the formula 440 x 2^(n/12) where n is the note number - implement a class that will be used to hold information about a musical note.
What was the students calculated value of r : Question- A student reacted 0.054 g of magnesium in a audiometer filled with water and Hcl. the water temperature wa 22.0 C. the barometer read 29.56 in Hg and 50.2 ml of gas wa collected. What was the students calculated value of R? What is the pe..
What is the limiting reagent : Write the balanced equation. What is the limiting reagent? What is the maximum number of grams of water which can form from this reaction? Find the number of moles of excess reactant at STP.
Write a function to insert a node after the head : In a doubly-lined list, each node points to both the next and previous nodes. The info in the each node is an integer and two pointers, one to the previous node and one to the next node - Define the node
What is the mole fraction of o2 in the final mixture : Question- Your Flasks A and B are connected by a stopcock. Initially flask A contains 1000.0 mL of O2 at 50 kPa pressure, while flask B contains750.0 mL N2 at 100 kPa pressure, both at 25 ºC. The stopcock is opened and the gases mix. What is the ..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a definition for two recursive methods

public static String filter(String s, String rem) to return a String that is the result of removing every occurrence of all of the characters in the second parameter from the first parameter. For example, filter("abcdbdabdcbddda","bd") should retu..

  If the number on two of the players'' four cards

If the number on two of the players' four cards is the same and the number on the remaining two cards is also the same yet the number on all four cards in not the same then the player gets their bet back and in addition wins 22 chips for each chip th..

  Implement a class quiz

Implement a class Quiz that implements the Measurable interface.

  Use either an array or a linked list

Use either an Array or a Linked List as an underlying data structure. Of course you need to create class Array or class LinedList in order to implement the methods like mergeSort(), merge(), etc

  Design a function named "falling distance"

Design a function named "fallingDistance" that accepts an objects falling time, in seconds, as an argument. The function should return the distance, in meters, that the object has fallen during that time interval. Design a program that calls the func..

  Modify your server to make it multithreaded your server

modify your server to make it multithreaded. your server should allow more than one client to connect and request

  A this adds storage of the maindata as an external random

a. this adds storage of the maindata as an external random access file with id as key to allow listall and query

  Write the classic arcade game of breakout

For each instance variable in your program, explain why you chose to make it an instance variable rather than a local variable - How did you test whether the game would end correctly in this second case? Did you make any changes to the code when test..

  Prepare a simple windows calculator in java it must have a

create a simple windows calculator in java. it should have a labeled text field for the user to provide input as well

  Java program to find a value at in index

Construct a main class named Array Program that generates an array of 50-integers, all ranging from one to one hundred.

  Method summarizesequences that takes a string as a parameter

Now implement the method summarizeSequences that takes a String as a parameter. This method should open the file named by this String, and read a sequence from that file into an array list using the getSequence method you wrote above

  Write a java program that will play connect four

Write a java program that will play connect four - Must be a simple program no applets, jframes.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd