Templates for the code:
Projectile motion equations * = [vot *cos(0)] + xo y=[vo t sin(o)) - - ] + X: x displacement Xo: initial x displacement Y: y displacement Yo: initial y displacement V. initial velocity t: time e initial angle g gravitational constant Keep in mind that the X and Y displacement is the distance from the projectiles origin at a given time stamp. See example below. Program Requirements: 1. The program shall use the first quadrant of a 2D coordinate plane. 2. The program shall have 2 projectiles named Hare and Hound 3. The program shall have the projectiles follow projectile motion equations. 4. The Hare shall have a random initial angle ranging from 0 to 90 degrees. 5. The Hare shall have a random initial velocity ranging from 70 to 120 meters per second 6. The Hare shall have a random initial height ranging from 400 to 1000 meters 7. The Hound shall have a random initial angle ranging from 0 to 90 degrees 8. The Hound shall have a random initial velocity ranging from 50 to 150 meters per second 9. The Hound shall have a starting height of 600 meters. 10. The Hare shall stop moving once it hits the ground 11. The Hound shall stop moving once it hits the ground 12. The program shall calculate the distance between the Hare and the Hound once they have both hit the ground 13. The program shall start both Hare and Hound on the left side of the screen (x = 0). 14. The program shall define ground as constant horizontal line. Homework Requirements: 1. The program shall run 2 iterations, 2. An Iteration shall consist of a. Setting up the Hare and hound (see Program Requirements 4-9) Homework Requirements: 1. The program shall run 2 iterations. 2. An Iteration shall consist of: a. Setting up the Hare and hound (see Program Requirements 4-9) b. Firing the Hare and Hound to follow projectile motion i. The program shall display the flight path in time intervals of 5 seconds c. Once the Hare and Hound hit the ground, the program shall display the distance between the Hare and the Hound 3. Iteration 1 shall have a ground shall defined as y+0. 4. Iteration 2 shall have a ground shall defined as y = 120. 5. The program shall have 2 classes Manager and Projectile 6. The Projectile class shall handle the location and movement. 7. The Manager class shall handle the 2 iterations using Projectile objects. public class Manager ( public static void main(String[] args) { //run each iteration } public static double randomFrom (int low int high) { //taken from lab 3/4 double randNum = 0; randNum - (Math.random(high-Low) return randum; + low): public static String distanceBetween(Projectile hare, Projectile hound) { 1/get the distance between the projectiles 3 public static void runIteration(int iterationum, int ground) { 1/create the projectiles with their randomized inputs System.out.println("Iteration iterationNum); W/start time System.out.println(" tare: "); 1/while the hare hasn't reached the ground, move it //restart time System.out.println(" Hound: ); //while the hound hasn't reached the ground. move it W/print out the distance between them } public class Projectile { //create attributes for the projectiles (take them from the hw doc) 1/don't forget to generate setters and getters //write the constructor so it takes in the inputs for each projectile and puts the //values in the right attributes public Projectile(/* inputs here...*/) { I } public void move(double time) { //just put the equations from the hw doc in here } //Setters and Getters... Projectile motion equations * = [vot *cos(0)] + xo y=[vo t sin(o)) - - ] + X: x displacement Xo: initial x displacement Y: y displacement Yo: initial y displacement V. initial velocity t: time e initial angle g gravitational constant Keep in mind that the X and Y displacement is the distance from the projectiles origin at a given time stamp. See example below. Program Requirements: 1. The program shall use the first quadrant of a 2D coordinate plane. 2. The program shall have 2 projectiles named Hare and Hound 3. The program shall have the projectiles follow projectile motion equations. 4. The Hare shall have a random initial angle ranging from 0 to 90 degrees. 5. The Hare shall have a random initial velocity ranging from 70 to 120 meters per second 6. The Hare shall have a random initial height ranging from 400 to 1000 meters 7. The Hound shall have a random initial angle ranging from 0 to 90 degrees 8. The Hound shall have a random initial velocity ranging from 50 to 150 meters per second 9. The Hound shall have a starting height of 600 meters. 10. The Hare shall stop moving once it hits the ground 11. The Hound shall stop moving once it hits the ground 12. The program shall calculate the distance between the Hare and the Hound once they have both hit the ground 13. The program shall start both Hare and Hound on the left side of the screen (x = 0). 14. The program shall define ground as constant horizontal line. Homework Requirements: 1. The program shall run 2 iterations, 2. An Iteration shall consist of a. Setting up the Hare and hound (see Program Requirements 4-9) Homework Requirements: 1. The program shall run 2 iterations. 2. An Iteration shall consist of: a. Setting up the Hare and hound (see Program Requirements 4-9) b. Firing the Hare and Hound to follow projectile motion i. The program shall display the flight path in time intervals of 5 seconds c. Once the Hare and Hound hit the ground, the program shall display the distance between the Hare and the Hound 3. Iteration 1 shall have a ground shall defined as y+0. 4. Iteration 2 shall have a ground shall defined as y = 120. 5. The program shall have 2 classes Manager and Projectile 6. The Projectile class shall handle the location and movement. 7. The Manager class shall handle the 2 iterations using Projectile objects. public class Manager ( public static void main(String[] args) { //run each iteration } public static double randomFrom (int low int high) { //taken from lab 3/4 double randNum = 0; randNum - (Math.random(high-Low) return randum; + low): public static String distanceBetween(Projectile hare, Projectile hound) { 1/get the distance between the projectiles 3 public static void runIteration(int iterationum, int ground) { 1/create the projectiles with their randomized inputs System.out.println("Iteration iterationNum); W/start time System.out.println(" tare: "); 1/while the hare hasn't reached the ground, move it //restart time System.out.println(" Hound: ); //while the hound hasn't reached the ground. move it W/print out the distance between them } public class Projectile { //create attributes for the projectiles (take them from the hw doc) 1/don't forget to generate setters and getters //write the constructor so it takes in the inputs for each projectile and puts the //values in the right attributes public Projectile(/* inputs here...*/) { I } public void move(double time) { //just put the equations from the hw doc in here } //Setters and Getters