Create a reference class called equaltemperedfrequency

Assignment Help Business Management
Reference no: EM13728469

JAVA ECLIPSE there are 2 classes in one package...first one is the method "EqualTemperedFrequency". 2nd one is PlayPianoScale...

Create a reference class called EqualTemperedFrequency. Have it implement the Comparable interface (see the first line of the Date class to see how to specify that). The class will contain a single double value that is a sound frequency. The API for the class should contain the following constructor and methods:

EqualTemperedFrequency(double initial): This constructor sets the the sound frequency of the object being created to the initial value supplied.
EqualTemperedFrequency next(): This returns an EqualTemperedFrequency object having the next higher frequency. Compute that next frequency by multiplying the frequency in this object by 2 raised to the 1/12 power. I suggest using the Math.pow method for this.
void play(double duration): This plays the frequency for the number of seconds specified by the duration parameter. Adapt the playNote method from group 1 for this method.
String toString(): This will return the frequency as a string. You might want to use the Double.toString() method.
int compareTo(EqualTemperedFrequency that): There are several ways to implement this method but however you do it, it must return -1 if this frequency is less than that frequency, 0 if they're equal, and 1 if this frequency is greater than that frequency.
boolean isLessThanOrEqual(EqualTemperedFrequency that): This returns true if this frequency is less than or equal to that frequency and false otherwise.
Make each of the above public.
Write a separate program that uses the EqualTemperedFrequency class to play the 88 frequencies of a piano. Call it PlayPianoScale. The lowest frequency a piano usually plays is 27.5.

Reference no: EM13728469

Questions Cloud

Features of localization vs standardization : Illustrate common and unique features of localization vs standardization using a Venn Diagram or similar chart, be sure that the chart or graph shows specific examples.
How do issues luther present for debate illustrate problems : Martin Luther wrote these propositions in order to engage in a debate with fellow theologians. How do the issues Luther present for debate illustrate the problems in the Church of his day?
Discuss the characteristics in leader : Document and discuss the characteristics in this leader that you see in your own strategic leadership or that you want to add to your strategic leadership. How would these characteristics in you transfer to your organizational culture?
Buckets of money : Julia Price Wants to Drive a BMW It has been almost 15 years since Julia graduated with a major in aeronautical engineering, and now she makes “buckets of money” working as a project manager for a large defence contracting company. While she is not v..
Create a reference class called equaltemperedfrequency : Create a reference class called EqualTemperedFrequency. Have it implement the Comparable interface (see the first line of the Date class to see how to specify that). The class will contain a single double value that is a sound frequency. The API for ..
Describe a time when you experienced effective communication : Describe a time when you experienced effective communication in a business environment and discuss at least three (3) reasons why you perceived the communication to be effective, and explain the resulting impact to the business.
Why did the reformation happen in early sixteen century : Why did the reformation happen in the early 16th century after Martin Luther posted the 95 thesis rather than earlier in response to other protests against Church practice?
Implementing changes in internal environment : Organizations must be able to respond effectively and rapidly to changes in their external environment by implementing changes in their internal environment. But change does not come easily and there are many barriers that have to be dealt with in..
Determine the dollar amount of the rebate : Kyle Parker of Fayetteville, Arkansas, has been shopping for a new car for several weeks. So far, he has negotiated a price of $27,000 on a model that carries a choice of a $2500 rebate or dealer financing at 2 percent APR. The dealer loan would requ..

Reviews

Write a Review

Business Management Questions & Answers

  Example of a charismatic leader

Example of a charismatic leader and why they are successful and another paragraph

  Explain mark offers to return the sum that rose paid

Explain Mark offers to return the sum that Rose paid him for his work but refuses to make good on the damage, Rose sues Mark in tort for the damage to her engine

  Characteristics of individual-better results in leadership

Discuss why losing well is a character trait that helps develop leaders, and Evaluate those characteristics of an individual that get successful results in leadership.

  Nterruptions from difficult people

How can group leaders effectively facilitate a meeting in spite of interruptions from difficult people and find at least one strategy for staying on track.

  Case study of dryden construction company

In 1994, the Dryden Construction Company contracted with the Ontario Hydro Electric Power Commission to build an access road 7 miles long from its Manitou Falls generating station to Provincial Highway No. 105. The contract contained the following..

  Important information about location strategies

The owners of Speedy Logistics, a company that provides overnight delivery of documents, are considering where to locate their new facility in the Midwest.

  Explain bob may now admit ted''s counteroffer

Bob obtainable to sell his racing bike to Ted for $2,500. Ted responded that it was much money however he would pay $1,500. Bob said no. Two days later Ted said that Bob's original offer was acceptable

  I want a swot analysis

I want a SWOT Analysis for Azul Linhas Aereas Brasileiras - A SWOT action matrix for azul linhas aereas brasileiras - And a SWOT analysis for azul linhas aereas brasileiras

  Explain why an individual''s perception of being plateaued

Resent research suggests that cater plateaus are more complex than previously thought. Briefly explain why an individual's perception of being plateaued is significant

  Relationship of manager roles to accountability

What is the relationship of manager roles and responsibilities to accountability and how is evidence-based management used to enhance managerial and organizational effectiveness?

  List out the different entities or objects-logical processes

List out the different entities or objects, logical processes, data flows and data stores that are involved, starting from the time you submitted your time sheet?

  Key roles and relationships with the company

Examine 3 salient stakeholders of the national rifle association based on key roles and relationships with the company.

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