Design an abstract data type in java

Assignment Help JAVA Programming
Reference no: EM131546

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: EM131546

Questions Cloud

Binomial probability distribution : Binomial probability distribution
Calculate annual rate of return : No additional fixed costs would be incurred if this proposal is accepted
Elasticity of demand : How much does the gross price increase in each market
Write a program that converts between app and ppm values : Write a simple program that converts between APP and PPM values
Design an abstract data type in java : Design an abstract data type in Java that represents a musical pitch
Determine the transportation cost : Determine the transportation cost
Evaluate earnings per share : Evaluate earnings per share
Modelise as a markov chain : modelise as a markov chain
Public transport fare ticketing system : Implement and test a public transport fare ticketing system.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Sorted list adt and the binary search tree adt

Explain the differences between our specifications of the Sorted List ADT and the Binary Search Tree ADT.

  Implementation of encryption and steganography in java

This is a project report showing the essential details and coding structures related with the implementation of encryption techniques and steganography in JAVA.

  Java problem - g queue

A queue is an ordered collection of items in which the removal of items is restricted to the FIFO ( rst in rst out) principle.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Implement the lexical and syntactic analysis

Implement the lexical and syntactic analysis of Minifun programming language.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Implementation activities of software development

Analysis, design, and implementation activities of software development

  Design and implementation of a hangman game

Design and Implementation of a Hangman game

  Socket programming in java: tcp

In this project we will develop a Web server in two steps. In the end, you will have built a multi-threaded Web server that is capable of processing multiple simultaneous service requests in parallel.

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