Chat with us, powered by LiveChat Project 3 | Writedemy

Project 3

Project 3

Write a JAVA program to solve the following problem. Your program should properly compile and run. Your code MUST follow the documentation style used in your textbook. You need to upload into Moodle the following:

· From this point on, each of your projects is expected to be composed of multiple source code files. Thus to organize these files, all of them have to be part of a single package. Your package name MUST match the directory containing your code files. Finally, you need to export your package as a .JAR file then upload this single file into Moodle. If you are not familiar with how to export your code into a .JAR file, please check the following link. Make sure that you include your source code files (check the appropriate check box) while exporting the .jar filehttp://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks

%2Ftasks-33.htm

Very Important Note: Do NOT upload any other files into Moodle; just ONE file with the extension “.jar” that is it.

Problem Statement:

The following method does not appear to be working properly if all data are negative numbers. You are asked to write a test driver class that will test this method in order to identify the issue with the code. The driver class will first read a data (from an input file called “inputData.txt”) into an integer array then call the method with different input parameters to test its functionality.

/** Finds the target value in array elements x[start] through x[last].

@param x array whose largest value is found

@param start first subscript in range

@param last last subscript in range

@return the largest value of x[start] through x[last]

@pre first <= last

*/

public int findMax(int[] x, int start, int last) {

if (start > last)

throw new IllegalArgumentException(“Empty range”);

int maxSoFar = 0;

for (int i = start; i < last; i++) {

if (x[i] > maxSoFar) maxSoFar = i;

}

return maxSoFar;

}

Page 1 of 2

Please do the following in this order:

1. In your code, you also need to include a brief description of your debugging plan as a series of comments that proceeds the method definition.

2. In order to properly debug the given method, you need to make sure that you have several print statements at various execution phases to ensure a better insight of how the given code work. After finishing the debugging the method and fixing the problem, you need to leave ALL debugging statements in, but execute them only when the global constant TESTING is true.

3. Before uploading your code. Make sure that it works properly for ANY combinations of input parameters and for all boundary conditions.

(End of Project)

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order