Question: COMP 4 8 2 Project 4 : Crazy Trampolining Due: 2 3 5 5 . 2 0 2 4 Points: 3 0 points possible Overview:

COMP482 Project 4: Crazy Trampolining
Due: 2355.2024
Points: 30 points possible
Overview: Imagine that you had a line of trampolines each with a different strength (some trampolines are very bouncy, but others less so). You will be given an integer array \( B \) which represents the bouncyness of the trampolines. You start on the last/rightmost trampoline and when at position \( i \) you can boounce up to \( B[i]\) trampolines to the left. Your goal ts to find the minimum number of bounces necessary to go from the rightmost trampoline to the leftmost trampoline.
Details: Your java program will be provided with a file called inpultxt. The first line will contain two integers: \( N \) the number of trampolines. The remainder of the file will contain \( N \) non-negative values which tell you the maximum number of cells you can move to the left in a single bounce. Your goal is to determine using dynamic programming the minimum number of bounces necessary.
Picky, but required specifications: Your project must:
- be submitted via canvas.
- consist of 1 or more dot-java files (no elass files, dip files, irmput files, or other files should be submitted).
- have each file begin with a comment containing your name and the project number.
- not be placed into any packagc.
- have one file called Project4.java (don't be coneerned if canvas adds a 'flag' -1,-2,... for repeated submissions).
- compile with the command 'javac Project4,java".
* run using the command java Project4".
- accept input from a file called inputixt in the same directory as the Java file(s) formatted precisely as described above.
- accomplishes the goal of the project. In ofher words. the output should be the correct answer formatted correctly.
- be submitted on time (early and multiple times is fine).
For each listed item you fail to follow, expect to lose at least 5 points. However, submitting via email will guarantee you a zero.
Examples: Your program should work on any valid input. I will be testing on much, much larger inputs. So you must use dynamic programming. Using ordinary recursion will result in a very slow exponential time algorithm instead of the obvious \(\Theta\left(N^{2}\right)\) algorithm. If you are looking for a challenge, see if you can speed the program up to time \(\Theta(N)\). I haven't written my version yet. So the following are not "real" results. Let me know if any of my hand-solutions are incorrect.
If inputixt contains:
then the output would be
If input.txt contains:
COMP 4 8 2 Project 4 : Crazy Trampolining Due: 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!