Answered step by step
Verified Expert Solution
Link Copied!

Question

00
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

image text in transcribed

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. You can only write this sort of program if you understand the physics involved. Here is quick explanation from the book

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions