Question: Need help writing Java Code 3. Write a computer program to play the Jump lt game described in Programming Projects #4 of chapter 11 (page
Need help writing Java Code








3. Write a computer program to play the "Jump lt" game described in Programming Projects #4 of chapter 11 (page 689.) You should read the BinarySearch algorithm in chapter 11 before doing this assignment. Define a class named Jump It as follows public class Jump It private String fileName: name of the file private int count 0; number of valid integers in the file private final int MAX SIZE 15; the size of the array constructor to set the game by reading integers from file read only MAX SIZE integers from the file, bad ints are ignored print out a message if file cannot be opened public JumpIt (String theName) constructor to set the file name this fileName new String (the Name) you may or may not want to do other stuffs here return the lowest total cost of the game throws an exception if the first int is not 0 public int play throws BadInputExceptionl print the all integers in the array public void print Game My File public class BadInput Exception extends Exception f public BadInput Exception f super ("The first int should be 0") or anything you like public BadInput Exception (String message) super (message)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
