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

  Create four classes

Create four classes: Account.java, Checking.java, Savings.java, and AccountArray.java.

  Implement bounded partial queue by using signaling mechanism

Implement the same using a signaling mechanism that signals to all waiting dequeuers and do a performance comparison using timing analysis. Which works faster?

  Display student details and classes in applet

Display student details and classes they have enrolled in Applet. The Applet should have following features. Update and View.

  Calculate the percent of kcal from each macronutrient

Calculate the percent of kcal from each macronutrient and the percent of kcal by fluids.

  Create a recursive factorial program

Assignment 1: Create a recursive factorial program that prompts the user for an integer  N  and writes out a series of equations representing the calculation of  N !. For example, if the input is 4, the output could be:

  Own file to test your program

Create your own file to test your program. Your job is to set up the input and output files to have the program read from a file and write to a file. Here is a basic program that will accomplish what is desired

  Create a web application for sheridan restaurant

Create a web application for Sheridan Restaurant Reviews that contains the following functionality - Display a table of all restaurants based on the city entered by the user

  Write java program to print strings given at command line

Write a program Average.java which just prints strings that it is given at command line, one per line. If nothing is given at command line, print "No arguments".

  A method that takes a two-dimensional array

A method that takes a two-dimensional array of int's as a parameter and searches the array for the second parameter, returning true if the second parameter matches any of the integers in the array, and false otherwise.

  Program that prompts the user to enter the year and display

Write a program that prompts the user to enter the the year and first day of the year and displays the calendar table for the year on the console. For example , if the user entered the year 2013, and 2 for tuesday, January 1, 2013, your program shoul..

  1 ra row your boatprepare a world with a boat a person

1. ra row your boatprepare a world with a boat a person sitting in the boat an island and a pier located 25 meters from

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