Question:

Java Program Help very very Urgent?

by Guest44908  |  earlier

0 LIKES UnLike

1. One tex file (suffix.java) for each java class that you define.

2. A documentation incl. The class diagram, the data dictionary, description of all methods and a paragraph or two describing the testing strategy.

Problem:

Your back garden is very crowded. A large (user specified) number n of grasshoppers live there. Each grasshopper can move at a given speed. They all eat leaves. Each of them keeps a tally of the number of leaves eaten “so far”. The dynamics of whole system can be described as follows:-

Input Phase – We start up system by positioning each grasshopper in the garden (at random point). For this assume that garden is a square surface described by points (x,y) with 0<=x<=1000 and 0<=y<=1000.

Simulation, proper – Then for number of times reps (again specified by user), a leaf appears at a random point in the garden. The computer finds the winner (the creature that is guaranteed to get their first) and increases the tally for the first grasshopper.

Final Computation – The winner of the whole game is the grasshopper with the largest tally at the end of simulation.

HINT

The usual way to solve the first issue is to use the Euclidean distance. If a grasshopper is at a point (a,b) and the leaf at point (c,d) then the distance b/w the two will be

Sqrt((a-c)^2+(b-d)^2)

 Tags:

   Report

1 ANSWERS


  1. I do not think anybody will do your project assignment for free.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.