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

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 ...

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 ...

Develop an application in java to accept the number of

Develop an application in Java to accept the number of students in a section for a subject and for each student accept the student number, Student name, prelim marks, midterm marks, final marks. The final grade should be ...

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 ...

Programming assignment - summer semester 2015-purpose-to

Programming Assignment - Summer Semester 2015- Purpose- To provide students with the opportunity to apply the knowledge acquired and skills developed. These include understanding of primitive data types and the concept o ...

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 ...

Java programmingyou have been asked by your manager to

Java programming You have been asked by your manager to create a user-friendly application that will present a survey to your customers. The application will compile and analyze the results entered by the survey responde ...

Student class and driverthis student class will be the data

"Student Class and Driver" This Student Class will be the data that will be used for each of the projects assigned and graded this semester. Your Student Class will consist of: Student Attributes: First Name Last Name ID ...

Programmers often develop different types of accounts to

Programmers often develop different types of accounts to provide access to a program for a variety of users. The structure of each account is formatted based on the needs of the user and how the program will be used. One ...

Below is the beginning of a java classpublic class

Below is the beginning of a Java class. public class Implement { private String name; private boolean hasMovingParts; private String constructedFrom; public Implement() { } a) Complete this class so that: i. The instance ...

  • 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