A sinusoid or sine wave is a mathematical function of the f
A sinusoid or sine wave is a mathematical function of the form?(?) = ? sin(2??? + ?0) + ?0,with four parameters:? denotes the amplitude of the sine wave (default value: 1).? denotes the frequency of the sine wave in Hz (default value: 1/2?).?0 denotes the amount of phase (horizontal) shift of the sine wave (default value: 0).?0 denotes the y-offset or vertical shift of the sine wave (default value: 0).Create a class called Sinusoid with four double data fields representing the four parameters. Additionally, create the following:No-argument constructor Sinusoid() that creates a sinusoid with the four default parameter values.Constructor Sinusoid(double newAmplitude, double newFreq, double newPhase, double newYOffset) that creates a sinusoid with the user-specified parameter values.Method double evalAt(double t) that evaluates the y value of the sinusoid at time t.Method double[] evalAt(double[] tArray) that evaluates the y values of the sinusoids at thetimes in array tArray.Method void printFunction() that prints the functional form of the sinusoid to the console with2 decimal places for each parameter, e.g. y(t) = 2.00sin(6.28t + 0.50) + 0.10 for the sinusoid with amplitude 2, frequency 1, phase 0.5, and y-offset 0.1.Submit your source code in a file named Sinusoid.java! Do not include a main() method in your submission!
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
