Get in touch with us
Send us an e-mail
Question
“Jump It” Game
The game “Jump It” consists of a board with n positive integers in a row, except for the first column, which always contains zero. These numbers represent the cost to enter each column. Here is a sample game board with n set to 6:
0 3 80 6 57 10
The objective of the game is to move from the first column to the last column with the lowest total cost. The number in each column represents the cost to enter that column. You always start the game in the first column and have two types of moves. You can either move to the adjacent column or jump over the adjacent column to land two columns over. The cost of a game is the sum of the costs of the visited columns.
In the board shown above, there are several ways to get to the end. Starting in the first column, our cost so far is 0. We could jump to 80, ten jump to 57, then move to 10 for a total cost of 80+57+10=147. However, a cheaper path would be to move to 3, jump to 6, then jump to 10, for a total cost of 3+6+10=19.
Write a recursive solution to this problem that computes the lowest cost of the game and outputs this value for an arbitrary large game board represented as an array. Your program does not have to output the actual sequence of jumps but only the lowest cost of this sequence. After making sure that your solution works on small arrays, test your solution on larger boards with larger values of n to get a feel for the scalability and efficiency of your solution.
Implement the game in a separate class Game. Write a driver that makes use of a Game object in a public class GameDriver that has the main method.
Summary
The question belongs to Computer Science and it discusses about developing a game called Jump It. The game is about moving from first column to the last column with the lowest total cost. This game needs to be developed using Java.
Total Word Count NA
Being a computer science engineer is my dream and it wouldn’t have possible for me to understand the basics of C++ programming without the help of TheReliableTutor and the engineering assignment tutors. I grasped C programming on my own, but for C++ and Java, I am definitely grateful to TheReliableTutor.
After I moved to Australia to study Computer Science and Engineering, I found out that the things are quite different than what it used to be in the Indian universities. The course structure is much more practical oriented and thus the numbers of assignments are also more. I was clueless and was struggling to cope when I came across HwA. Thanks to them I got through my first two semesters with good grades and that boosted my confidence. Now I am pursuing my post-graduation from a Queensland based reputed technology university and still taking help from HwA.
When I moved to the US for my MBA I was in deep confusion over the absolutely different ways that the professors taught and expected the assignments and homework essays to be written. I desperately needed guidance from someone who had experience in the US MBA curriculum and how it was taught. At HwA I got the exact tutoring help that I was looking for. The online finance tutor not only helped me understand the concepts of finance management but also guided me through the process of writing the assignments and homework essays. My grades improved and so did my confidence.
The precise and brief annotated bibliography submitted by the writing expert at HwA for my World Religion thesis paper was just what my professor had asked for. There was no problem in communication between the writing expert and me and the research work done was absolutely spot on.
I am very happy with the timely delivery, value for money and 24x7 availability of the online assignment experts. The tutors assigned really listened to my requirements and delivered the assignment help to my exact specifications. Thank you so much TheReliableTutor
Comments
this is a very good website
I have 50 questions for the same test your page is showing only 28
hi can you please help or guide me to answer my assignments. thanks
hi can anyone help or guide me to my assignments. thanks
This solution is perfect ...thanks
Hello Allison,I love the 2nd image that you did! I also, had never heard of SumoPaint, is something that I will have to exolpre a bit! I understand completely the 52 (or so) youtube videos that you probably watched. Sometimes they have what you want, sometimes they don't! However, it is always satisfying when you are able to produce something that you have taught yourself. Great job!Debra 0 likes
Perfect bank of solution.
great !
thanks for the quick response. the solution looks good. :)
thnx for the answer. it was perfect. just the way i wanted it.
works fine.