1. Engineering
  2. Computer Science
  3. 1 create a package with the name of driverclass a...

Question: 1 create a package with the name of driverclass a...

Question details

1. Create a package with the name of DriverClass

a. Your DriverClass contains method main().

2. Create an interface with the name of SortADTInterface which contains the following methods’ headers: public void insertionSort(int arr[]); public void printArray(int arr[]);

3. Write a class called InsertionSortClass that implements the interface SortADTInterface.

4. In the main(), include the following items:

a. An array a = { 3, 2, 5, 6, 1}

b. An object with the type of InsertionSortClass

c. Call to the the methods insertionSort() and printArray() with the appropriate array as parameter.

5. The output is sorted array a.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution