Ask Question, Ask an Expert


Ask Java Expert

Home >> Java

1. Design an abstract data type in Java which represents a musical pitch ( The ADT must store the note or pitch as an integer value. In this case, the ADT must 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”),


b) The number of half steps above a commonly agreed-upon pitch, like A (in modern times, considered to be 440Hz). It is generally 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.


c) The common music note (C, D, E, F, G, A, B) with 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 ex, 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.


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 two times the other. A half-step or semitone increase in pitch is 12√2 = 1.06 times higher.

f) Your pitch constructors must admit 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 must be capable to provide its frequency in either cycles per second or half-steps or MIDI absolute numbers.

h) It must be probable 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.

Java, Programming

  • Category:- Java
  • Reference No.:- M91584

Have any Question? 

Related Questions in Java

Animal characteristicsin todays fast-paced world it is

Animal characteristics In today's fast-paced world, it is important for programmers to think about potential future changes that impact their programs. One way that software developers can address this concern is by desi ...

Overviewthis assignment is intended to familiarize students

Overview: This assignment is intended to familiarize students with web application design, basic servlet functionality, and application deployment with a focus on servlet HTML generation and page navigation. The goal is ...

Question 1 illustrate that the nodes of any avl tree t can

Question 1. Illustrate that the nodes of any AVL tree T can be colored "red" and "black" so that T becomes a red-black tree. Question 2. Illustrate that via AVL single rotation, any binary search tree T1 can be transform ...

Write two java program by netbeans1 create a program that

Write two java program by Netbeans. 1. Create a program that ask for a radius of a circle and has the ability to return both the Area and Circumference - so methods call getArea() and getCircumferance() 2. Create a progr ...

Instructionsi what are the diagrams defined in the uml

Instructions I. What are the diagrams defined in the UML Standard. Give a one or two sentence description of each one. II. Given the following code, how should the toString methods in the classes H2ClassA and H2ClassB be ...

Part 1 text readingchapter 3 chapter 4 part 2 textbook

Part 1. Text reading Chapter 3, Chapter 4 Part 2 . Textbook questions Chapter 3. Describe why an application developer might choose to run over TCP rather than UDP. Suppose host A is sending host B a large file over a TC ...

Topic java part a airline seatingmillions of commercial

Topic: Java Part A: Airline seating Millions of commercial airline flights cross the world's cities every year, and each one of these flights must solve what seems like a simple problem: how do you arrange where each pas ...

Code reviewcan some have this done immediatelypublic class

Code Review Can some have this done immediately public class BankAccount { private double balance; public BankAccount() { balance = 0; } public BankAccount(double initialBalance) { balance = initialBalance; } public void ...

Java- object-oriented and concurrent programmingheres a

Java- Object-Oriented and Concurrent Programming Here's a very quick overview of the projects: 1. Read a data file, create the internal data structure, create a GUI to display the structure, and let the user search the s ...

Chapter 1 - challenge 3 - training workshopsyour company

Chapter 1 - Challenge #3 - Training Workshops Your company likes to present training workshops that help people in the information technology industry improve their skills. Your task is to write and object-oriented appli ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate