subject

Write in Java please Description
There is a cricket that lives by our timeshare in Myrtle Beach, South Carolina. Most every night I hear it patiently chirping away. Some nights it chirps faster than others, and it seems like the warmer it is, the faster it chirps. There are many crickets, and each of them seems to behave the same. On several different nights, armed with a stopwatch and a thermometer, I recorded the frequency of the chirps and compared it to that night's air temperature.
Experimental Results
The chirping follows a simple linear formula: take the number of chirps, add 40 and divide that sum by four to get the temperature in degrees Fahrenheit.
Assignment
Create a simulation to model the crickets chirping at various randomly generated frequencies, create an Environmentclass that knows and can return the current temperature. Create a Cricket class that chirps, or for simplicity, returns how many chirps per minute the cricket would make at that temperature. Repeat the simulation for at least three trials.
Extension: There is a cricket variety in some parts of South Carolina that is a little slower than most normal Carolina crickets. Add a ClemsonCricket class that extends Cricket but chirps slower by 20%.
Bonus: Implement polymorphism in the driver class.
Rubrics
Cricket class should include the following items:
A variable that stores the frequency of chirps.
A default constructor that initializes the frequency to a random value
An overloaded constructor that initializes the frequency to a value of your choice that gets passed on as a parameter.
A method for changing the frequency to a random value.
A getter method that returns the frequency.
clemsonCricket class should include the following items:
A default constructor that initializes the frequency to a random value that is 20% lower than what the parent class constructor would initialize it to.
A overloaded constructor that calls to the parent constructor.
A polymorphic method that changes the frequency value to a value that is 20% lower than what the parent method would change it to.
Environment class should include the following items:
A variable that stores the temperature.
A default constructor that initializes the temperature to a value of your choosing.
An overloaded constructor that initializes the temperature based on the formula in the assignment.
A method that takes in a frequency as a parameter and calculates the temperature based on the formula in the assignment.
testCrickets program should do the following items:
Creates an Environment object in the test program or in the Cricket or clemsonCricket classes and displays temperature Creates a cricket object and displays temperature before and after changing frequency
Creates a Clemson cricket object and displays temperature before and after changing frequency
Creates a polymorphic Clemson cricket object and displays temperature before and after changing frequency.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 20:00
What multimedia system creates an immersive, real-life experience that the user can interact with?
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
The initial tableau of a linear programming problem is given. use the simplex method to solve it. x 1 x 2 x 3 s 1 s 2 z 1 2 4 1 0 0 8 3 4 1 0 1 0 10 minus3 minus12 1 0 0 1 0 the maximum is nothing when x 1equals nothing, x 2equals nothing, x 3equals nothing, s 1equals3, and s 2equals0. (be sure to simplify to lowest terms if necessary.)
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
When writing a business letter, how many times can you use the same merge field in a document? once once, unless using the address block feature unlimited it will depend on the type of document you choose
Answers: 1
question
Computers and Technology, 25.06.2019 06:30
How can u permanently delete a picture from your camera ?
Answers: 1
You know the right answer?
Write in Java please Description
There is a cricket that lives by our timeshare in Myrtle Bea...
Questions
question
Mathematics, 24.02.2020 22:21
question
Mathematics, 24.02.2020 22:21
question
Mathematics, 24.02.2020 22:21
question
History, 24.02.2020 22:21
Questions on the website: 13722360