Purchase Solution

Creating a Recursive Java Program That Sorts Objects

Not what you're looking for?

Ask Custom Question

I need to implement a class 'SearchSort' which contains recursive versions of the methods below:

static void selectionSort(Comparable[] list)
static boolean binarySearch(Comparable[] list, Comparable target) // true if target in list

The signatures of the method like the ones above.
The class (SearchSort) must also have the method 'static boolean isSorted(Comparable[] list)' that returns true if (and only if) the enclosed list is sorted (smallest item first).

Another program 'SearchSortMain' shows and tests the different methods.

Enclosed please find an example of names and telephone numbers that can be used for sorting.

Purchase this Solution

Solution Summary

Provides steps necessary to create a recursive Java program that sorts objects.

Solution Preview

Please see attached files - "SearchSort.java", "SearchSortMain.java".

The file "SearchSort.java" ...

Purchase this Solution

Free BrainMass Quizzes
C++ Operators

This quiz tests a student's knowledge about C++ operators.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Javscript Basics

Quiz on basics of javascript programming language.

C# variables and classes

This quiz contains questions about C# classes and variables.