Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Business Management Expert

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.

Business Management, Management Studies

  • Category:- Business Management
  • Reference No.:- M91267846
  • Price:- $40

Guranteed 36 Hours Delivery, In Price:- $40

Have any Question?


Related Questions in Business Management

Is project control different in an agile project what is

Is project control different in an Agile project? What is the role of a project manager in controlling an Agile project? What is the role of the project client, sponsor, or customer at controlling project changes?

Explain a business process you are familiar with describe

Explain a business process you are familiar with. Describe how a computer-based information system is related (or used) in this business process. Explain how a computer-based information systems can improve the efficienc ...

In global management perspective what do you think you

In global management perspective What do you think you could use in your work-related activities to help?

Explain why having a cultural profile of people in the

Explain why having a cultural profile of people in the official's cultural group could help you avoid a breakdown in communication in this situation. How can you get through the intercultural impasse and obtain a contrac ...

The balanced scoreboard approach has gained popularity in

The balanced scoreboard approach has gained popularity in recent years. What is this approach and how does it integrate strategic and operational control?

Read article READ ARTICLE

READ ARTICLE https://www.tradegecko.com/blog/ikeas-inventory-management-strategy-ikea 1. Discuss what other company(ies) or industry(ies) would benefit from a similar strategy. 2. Defend your choice and clearly state wha ...

If the price of good a falls from 4 to 3 and the quantity

If the price of good A falls from $4 to $3 and the quantity demanded of good B rises from 2 to 4, what is the cross-price elasticity of demand? Are these goods complements or substitutes?

What should be done to maintain optimum stock levels and

What should be done to maintain optimum stock levels and why is it important to keep accurate and up-to-date records of stock?

There are 5 categories of strategy formulation available to

There are 5 categories of strategy formulation available to utilize: directional strategies, adaptive, market entry, competitive, and implementation strategies. Is it important to formulate strategies in this specific or ...

1 what is an entrepreneur and how is the entrepreneur

1. What is an entrepreneur? and How is the entrepreneur different from the inventor, promoter, and administrator? 2. What is intrapreneurship? and How can it be enabled in an organization?

  • 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

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As