Question
Please use eclipse IDE java thank you. Write a program that simulates a bouncing ball by computing its height in feet at each second as
Please use eclipse IDE java thank you. Write a program that simulates a bouncing ball by computing its height in feet at each second as time passes on a simulated clock. At time zero, the ball begins at height zero and has an initial velocity supplied by the user. (An initial velocity of at least 100 feet per second is a good choice.) After each second, change the height by adding the current velocity; then subtract 32 from velocity. If the new height is less than zero, multiply both the height and the velocity by -0.5 to simulate the bounce. Stop at the fifth bounce. The output should have the following form: Enter the initial velocity of the ball: 100 Time: 0 Height: 0.0 ft. Time: 1 Height: 100.0 ft. Time: 2 Height: 168.0 ft. Time: 3 Height: 204.0 ft. Time: 4 Height: 208.0 ft. Time: 5 Height: 180.0 ft. Time: 6 Height: 120.0 ft. Time: 7 Height: 28.0 ft. Bounce! Time: 8 Height: 48.0 ft.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started