1. Engineering
  2. Computer Science
  3. fish spawn point x y h a for now...

Question: fish spawn point x y h a for now...

Question details

● Fish spawn point (x, y) (h, A) For now, lets assume that your game world contains a single circular landmass of radius ceit rrct he distauce of the point (h, k). Given a random spawn point (a, s) for your fish, you wast to dete that point from the shoreline Lets do some algebra! Using the distance formula, the distance of the spawn point (r, v) from the center of the circular landmass (h, k) is vrz-NTT,-郁. of that distance, r is itself. So the distance d from (a, y) to the shoreline is just the difference ethat psitive value for d indicatcs that your fish are in the occa: s sero value for d indicates that your fish are right on the shoreline; and a negati ve value for d indicatos that your fish have somchow appeared on land (which could make for an intcrosting game). write a program named DistanceChecker.java that allows the user to enter allow decinals Within your Lab2 folder, imputs for r, à, k, and the location of the fish spawn point (r,y). All of the inputs should Your program should then compute and display the distance d using cquation (1). Heres an example of what your completed program night look like when you run it、Undtlied part indicate what you type in as the program is running. What is the radius of your circular landmass? 50 What are the x and y coordinates of the center of your landmass? 12 at are the x and y coordinates of your fish spavn point? fish are a distance of 127.79201331893398 from the shoreline.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution