Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is written in java. Follow all the instructions and make sure the program has all the components of the rubric. Extra information: Rubric: Instructions:

This is written in java.

Follow all the instructions and make sure the program has all the components of the rubric.

image text in transcribedExtra information:

image text in transcribedRubric:

image text in transcribed

Instructions: You are a part of a team that will be competing at a Fruit Catapult Contest. The goal is to hit targets located at different distances. To help, you need to write a program to calculate the trajectory of a projectile based on launch angles and launch velocities. 1. Create a new project called 08.05 Catapult Trajectory in the Mod08 Assignments folder. 2. Determine the fruit you will be using during the contest. Then create two classes: one to implement your catapult object and the other to test it. The class names are your choice. 3. Review the information about calculating projectile trajectories in the Background Information section below. 4. Look up the toRadians () and the sin() methods in the Java API for the Math class. The sin() method parameter must be in radians. 5. Take time to plan your project. The program must use OOP design. 6. Determine the range of speeds and angles to use for the table. Use at least five speeds and six angles. Speeds can be in MPH or KPH, so be sure to label the output accordingly. A suggestion would be to assign the speeds and angles to one- dimensional arrays. 7. Calculate the distance an object can be catapulted for each speed and angle. Store the distance values in a two-dimensional array. The units used for the distance is up to you. Be sure to label your table accordingly. (See expected output). Expected Output: When your program runs correctly, the format of the output table should resemble the following, but with the appropriate data for each row and column. You may use appropriate angles and velocities of your choice. Be sure to include the units used for speed and distance. Projectile Distance (feet) 35 deg 40 deg MPH 25 deg 30 deg 45 deg 50 deg ========== 20 25 30 35 40 45 50 Background Information: Trajectory of a Projectile The distance (R) of a projectile can easily be calculated using the following simple algebraic formula, if a few complicating factors are ignored (e.g., wind speed, drag coefficient, etc.). Vo? sin(20) R = g where, vo is the launch speed, O is the launch angle, and g is the acceleration due to gravity s? Suppose you could launch a projectile at a speed of 40 meters/second (about 90 miles per hour) and a launch angle of 25 degrees. How far down range (R) could the projectile be hurled? vosin(20) RE g (40m/s) sin(2-25) R= 9.8m/s? 1600m R = (0.7660 S4 9.8m R = 125m 100cm lin Ift R = 125m m 2.54cm 12 in 3.2808ft R = 125m im R= 410ft The solution for finding the down range distance of a projectile launched at a speed of 40 m/s and a launch angle of 25 is shown here. Be sure that you can work through the algebra and solve the equation with a calculator. Soon, you will turn it into an arithmetic expression in Java. Work out several answers with pencil, paper, and calculator first, before attempting to write the program. Pay close attention to units. If your speeds are miles per hour, convert them to meters per second. If you want your final result to be in feet, do that conversion, too. 08.05 2D Array Part 2 Grading Rubric Points Possible Points Earned Components Comments include name, date, and purpose of the program. 1 Implementation class correctly written. 2 Client class correctly written. 2 Method documentation included. 1 Method headers correctly written. 2 Methods correctly implemented. 4 Two-dimensional array properly defined and implemented. 5 Loops correctly used. 2 Output neatly displayed in columns and rows. 2 Output printed with printf() method. 2 No compiler or runtime errors. 1 Thoughtful PMR included. 1 Total 25 Instructions: You are a part of a team that will be competing at a Fruit Catapult Contest. The goal is to hit targets located at different distances. To help, you need to write a program to calculate the trajectory of a projectile based on launch angles and launch velocities. 1. Create a new project called 08.05 Catapult Trajectory in the Mod08 Assignments folder. 2. Determine the fruit you will be using during the contest. Then create two classes: one to implement your catapult object and the other to test it. The class names are your choice. 3. Review the information about calculating projectile trajectories in the Background Information section below. 4. Look up the toRadians () and the sin() methods in the Java API for the Math class. The sin() method parameter must be in radians. 5. Take time to plan your project. The program must use OOP design. 6. Determine the range of speeds and angles to use for the table. Use at least five speeds and six angles. Speeds can be in MPH or KPH, so be sure to label the output accordingly. A suggestion would be to assign the speeds and angles to one- dimensional arrays. 7. Calculate the distance an object can be catapulted for each speed and angle. Store the distance values in a two-dimensional array. The units used for the distance is up to you. Be sure to label your table accordingly. (See expected output). Expected Output: When your program runs correctly, the format of the output table should resemble the following, but with the appropriate data for each row and column. You may use appropriate angles and velocities of your choice. Be sure to include the units used for speed and distance. Projectile Distance (feet) 35 deg 40 deg MPH 25 deg 30 deg 45 deg 50 deg ========== 20 25 30 35 40 45 50 Background Information: Trajectory of a Projectile The distance (R) of a projectile can easily be calculated using the following simple algebraic formula, if a few complicating factors are ignored (e.g., wind speed, drag coefficient, etc.). Vo? sin(20) R = g where, vo is the launch speed, O is the launch angle, and g is the acceleration due to gravity s? Suppose you could launch a projectile at a speed of 40 meters/second (about 90 miles per hour) and a launch angle of 25 degrees. How far down range (R) could the projectile be hurled? vosin(20) RE g (40m/s) sin(2-25) R= 9.8m/s? 1600m R = (0.7660 S4 9.8m R = 125m 100cm lin Ift R = 125m m 2.54cm 12 in 3.2808ft R = 125m im R= 410ft The solution for finding the down range distance of a projectile launched at a speed of 40 m/s and a launch angle of 25 is shown here. Be sure that you can work through the algebra and solve the equation with a calculator. Soon, you will turn it into an arithmetic expression in Java. Work out several answers with pencil, paper, and calculator first, before attempting to write the program. Pay close attention to units. If your speeds are miles per hour, convert them to meters per second. If you want your final result to be in feet, do that conversion, too. 08.05 2D Array Part 2 Grading Rubric Points Possible Points Earned Components Comments include name, date, and purpose of the program. 1 Implementation class correctly written. 2 Client class correctly written. 2 Method documentation included. 1 Method headers correctly written. 2 Methods correctly implemented. 4 Two-dimensional array properly defined and implemented. 5 Loops correctly used. 2 Output neatly displayed in columns and rows. 2 Output printed with printf() method. 2 No compiler or runtime errors. 1 Thoughtful PMR included. 1 Total 25

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Navigating The Supply Chain Maze A Comprehensive Guide To Optimize Operations And Drive Success

Authors: Michael E Kirshteyn Ph D

1st Edition

B0CPQ2RBYC, 979-8870727585

More Books

Students also viewed these Databases questions