Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program angryBird.java that allows a player to launch a bird to hit the monster pig. Your program should randomly place an angry bird
Write a program angryBird.java that allows a player to launch a bird to hit the monster pig. Your program should randomly place an angry bird between 200 and 1500 meters away and let the user know the distance to the monster pig. Let the user enter a phi (angle in degrees) and an initial (Slingshot) velocity in meters/second. Calculate where the projectile (angry bird) lands and inform the player. If the projectile (angry bird) lands within 5 meters on either side of the monster pig, the monster pig is destroyed. Otherwise, loop back and allow the user to shoot again (max 5 times). NOTE. Assume target and launch point are at the same level
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