1design an abstract data type in java that represents a

Assignment Help JAVA Programming
Reference no: EM13347613

1. Design an abstract data type in Java that represents a musical pitch (NoteADT.java). The ADT should store the note or pitch as an integer value. In this case, the ADT should be developed as an abstract class rather than an interface.

A pitch or a note can be completely specified as:

a) a number of cycles per second (or hertz, abbreviated "Hz"),

                                       or

b) the number of half steps above a commonly agreed-upon pitch, such as A (in modern times, considered to be 440Hz). It is commonly referred as a concert pitch since it is the reference pitch that the members of orchestra (and most other professional musicians) tune to before they perform.

                                       or

c) the common music note (C, D, E, F, G, A, B) with the suffix indicating the octave number [-1, 9] and an additional suffix prefix ‘#' for sharp notes and ‘b' for flat notes ( a ‘b' will lower a note by a half-step). For example, C4# or C#4 or D4b or Db4 is the C-sharp note of the 4th octave, and A6 is the A of the 6th octave.

                                       or

d) the MIDI absolute note number ranging from [0, 127]

e) Higher pitches have higher frequencies. Two pitches are an octave (12 semitones) apart if one has a frequency twice the other. A half-step or semitone increase in pitch is times higher.

f) Your pitch constructors should accept a frequency (a double) as in 1a), or a number of half-steps (an int) above or below the concert pitch as in 1b) or a music note (a String) as in 1c). Imperfect frequencies should be tuned to the nearest half pitch.

g) Once constructed, a pitch should be able to provide its frequency in either cycles per second or half-steps or MIDI absolute numbers.

h) It must be possible to compare the notes using the Comparable interface, to find out if the two notes form an octave and to raise or lower the note by the number of semi-tones.

Reference no: EM13347613

Questions Cloud

1 if the mean number of hours of television watched by : 1. if the mean number of hours of television watched by teenagers per week is 12 with a standard deviation of 2 hours
Here is part aclark paints the production department has : here is part aclark paints the production department has been investigating possible ways to trim total production
Problem 1the elasticity of demand for home computers is -25 : problem 1.the elasticity of demand for home computers is -2.5 the elasticity of demand for business computers is -.90
Task your task is to write a simple program that converts : task your task is to write a simple program that converts between app and ppm values. the screenshots below
1design an abstract data type in java that represents a : 1.design an abstract data type in java that represents a musical pitch noteadt.java. the adt should store the note or
The sunshine tomato soup shippers gives tomato soup at : the sunshine tomato soup shippers gives tomato soup at three west coast canneries in bakersfield eugene and phoenix.
1 darren corporation had net income of 250000 and paid : 1. darren corporation had net income of 250000 and paid dividends of 50000 to common stockholders and 10000 to
A shop is selling laptops at regular price and at half : a shop is selling laptops at regular price and at half price. if the laptops are regular price a day they can be at
In this assignment you have to implement and test a public : in this assignment you have to implement and test a public transport fare ticketing system. you will need to

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write java program to print price of table-furniture company

Write down the Java program for furniture company. Ask user to select P for Pine, O for Oak or M for Mahogany. Illustrate the price of table produced with chosen wood.

  Program (using java) that is suppose to find the largest

writing a program (using java) that is suppose to find the lowest integer that can be evenly divided by a range (ex. 1-25). I need help fixing/debugging it so it comes up with the proper output.

  Class that stores information about a report

Create a class that stores information about a report containing multiple currency transactions in multiple currencies. This includes the name of the report and each of the transactions that occurred.

  1 gqueuea queue is an ordered collection of items in which

1 gqueuea queue is an ordered collection of items in which the removal of items is restricted to the fifo rst in rst

  Your letterinventory class must use an array

Your LetterInventory class must use an array of Counter objects. Note that there is no nextChar method in the Scanner class. You must use the next() method and then use a loop through the characters of the token that is returned. Ignore any character..

  Create the class airplane

Your missions is to create the class Airplane. Each Airplane object should store the following information (fields):

  Elements from a html document

Function test Count List Elements should simply retrieve an array of all list elements on the page and assert that their total count is 3.

  How to count number of objects (instances) created

How to count number of objects (instances) Created, use java code and please be descriptive

  Algorithm analysis with advanced data structures

Write a program to help the merchants devise a sequence of transmutations that would change silver into gold with the smallest possible total fee paid to the alchemists.

  Alicia creates a button using the code jbutton exit button

Alicia creates a button using the code JButton exitButton = new JButton("exit"); and places it into a JFrame named mainFrame

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Problem on java progamming

Which parts of the assignment were you not able to complete fully? For each, explain why you were unable to complete this part and what steps you took to attempt to complete it.

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