Your Perfect Assignment is Just a Click Away

Starting at $8.00 per Page

100% Original, Plagiarism Free, Customized to Your instructions!

glass
pen
clip
papers
heaphones

COP 3337 FIU Create Catapult Object for Searchable Matrix of Trajectories Coding Task

COP 3337 FIU Create Catapult Object for Searchable Matrix of Trajectories Coding Task

Question Description

I’m working on a java project and need a sample draft to help me study.

Overview

You are a part of a team that will be completing at a Catapult Contest. Your team will be attacking the castle. The goal is to launch the catapult over the wall surrounding the castle but not go beyond the far castle wall. To help your team to victory, you need to write a program to calculate the trajectory of a projectile based on launch angles and launch velocities. It will create a matrix of all of the possible trajectories as well as the trajectories to help your team hit the target range. Review the information about calculating projectile trajectories in the Background Information section below. Look up the toRadians() and the sin() methods in the Java API for the Math class. Remember, the sin() method parameter must be in radians so the degrees given must converted to radians. Take time to plan your project. The program must use an OOP design.

Specifications

Rules

The program will create a Catapult object that will create a searchable matrix of trajectories for the given speeds and angles. The object should store these values in a 2D array. Given a target range of minimum and maximum distances, representing the near and far castle walls, the program should search the calculated trajectories and return a list of speed and angle combinations that can be used by your team to successfully launch the catapult. The output should be in an easy to read human readable format. If there are no speed and angle pairs in the current set that will accomplish the goal in the current matrix, the program should also graciously tell the users that they do not have a viable launch. The program will have a number of potential sets of speeds and angles. The program should be able to run the simulation as many times as indicated by the user (found in the text file). Input will be done from a text file rather than keyboard input.

The program will take input from a text file containing the following information on each line:

Number of sets

Number of speeds, followed by a list of speeds

Number of angles, followed by a list of angles

Minimum trajectory

Maximum trajectory

**speeds, angles, maximum and minimum repeated for the specified number of sets

Download the test data file linked from the same section as the assignment.

Sample Text File contents:

legend for a sample text file used for input

Expected Output:

When your program runs correctly, the program should output a table of possible distance values and under the table there should be a list of the speed and angle pairs that match. Note, there will be a series of projectile tables in the output – one for each of the tests. When the program is run, there should be a projectile table and a set of best trajectory values for each set. If there are 7 sets of data, there should be 7 tables in the output. The image below is an example for 1 set of data. The format of the output table should resemble the following, but with the appropriate data for each row and column.

sample output from the program for a single set of data

Java Requirements

The program must utilize single dimensional arrays to store the speeds and angles. At a minimum, you will need one 2D array to store the values for the trajectories. How you define the logic and utilize these arrays is up to you.

The program must be created from an object-oriented perspective. Most of the work should be completed in the object class. The program must use methods appropriately.

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.).

formula for calculation

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) in meters could the projectile be hurled?

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. Remember, that Angles are giving in degrees, so the degrees must first be converted to radians.

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.

formula worked out

In programming pseudocode, the calculation would look something like this:

result = current_speed raised to the power of 2 * the sin of the angle in radians * 2 / gravitational constant

Be sure that the gravitational constant in the correct form for the unit of measure you are using.

Work out several answers with pencil, paper, and calculator first, before attempting to write the program. Pay close attention to units. The final units should be in meters.

Once you have it working as expected upload the .java file to this assignment drop box. You must also submit a Word doc or text file containing the Java code. Assignments not containing both the Java code and the text or Word file will be assigned a 0 for a grade.

Rubric

Catapult Rubric

Catapult Rubric

Criteria Ratings Pts

This criterion is linked to a Learning OutcomeOOP design used and Catapult object created correctly

10 pts

Full Marks

OOP design used and the Catapult object creates a searchable matrix of trajectories for the given speeds and angles

5 pts

Partial Credit

OOP design not used or the Catapult object does not correctly create a searchable matrix of trajectories for the given speeds and angles

0 pts

No Marks

OOP design not used nor does the Catapult object correctly create a searchable matrix of trajectories for the given speeds and angles

10 pts

This criterion is linked to a Learning OutcomeCalculations are correct and the appropriate Math class methods are used

10 pts

Full Marks

Calculations are correctly created and use the sin() and toRadians() methods where appropriate

5 pts

Partial Credit

Calculations are incorrect or the sin() and toRadians() methods where not used

0 pts

No Marks

Calculations are incorrect and the sin() and toRadians() methods where not used

10 pts

This criterion is linked to a Learning OutcomeInput read from a text file and calculations stored correctly

10 pts

Full Marks

Input read from a text file and the calculations are stored appropriately

5 pts

Partial Credit

Input is not read from a text file or is hard coded or the calculations are not stored appropriately

0 pts

No Marks

Input is not read from a text file or is hard coded and the calculations are not stored appropriately

10 pts

This criterion is linked to a Learning OutcomeSingle dimensional arrays used appropriately

10 pts

Full Marks

Single dimensional arrays used to store the speed and angle values. Loops are used to iterate through the arrays

5 pts

Partial Credit

Single dimensional arrays used to store either the speed and angle values. Loops are used to iterate through the arrays

0 pts

No Marks

Speed and angle values are not stored in arrays. Loops are not used to iterate through the arrays

10 pts

This criterion is linked to a Learning Outcome2D array(s) used appropriately

10 pts

Full Marks

2D array(s) are used to store the calculated values. Loops are used to iterate through the array(s)

5 pts

Partial Credit

2D array(s) are used to store the calculated values. Loops are consistently used to iterate through the array(s)

0 pts

No Marks

The calculated results are not stored in a 2D array. Loops are not used to iterate through the array(s)

10 pts

This criterion is linked to a Learning OutcomeOutput is correct

10 pts

Full Marks

Output is correct and contains all of the possible distances in a table. Under the tables there should be a list of the speed and angle pairs that fit the requirements

5 pts

Partial Credit

Output is mostly correct but there are elements are missing from the required output

0 pts

No Marks

The output is mostly incorrect. A majority of the elements are missing

10 pts

This criterion is linked to a Learning OutcomeCode compiles and runs without errors

15 pts

Full Marks

Code compiles and runs without errors

0 pts

No Marks

Code does not compile

15 pts

This criterion is linked to a Learning OutcomeCode is properly commented

10 pts

Full Marks

Code is properly commented including all required header information

5 pts

Partial Credit

Code has some of the required comments but is sparsely commented or missing the correct header information

0 pts

No Marks

Code is sparsely commented or not commented at all and is missing all or most of the correct header information

10 pts

This criterion is linked to a Learning OutcomeProgram is properly designed and uses whitespace effectively

15 pts

Full Marks

Program is properly designed and uses whitespace effectively

5 pts

Partial Credit

Program is not properly designed or it does not use whitespace effectively

0 pts

No Marks

Program is not properly designed and it does not use whitespace effectively

15 pts

Total Points: 100


"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.