Setting up modules for student

This commit is contained in:
2020-05-29 09:33:31 -05:00
parent d1d6557bef
commit 867b906f0c
6 changed files with 50 additions and 4 deletions

View File

@@ -1,9 +1,15 @@
package Sorting;
/**
* This class contains the main method and presents an interface for the user to
* compare sorting algorithm efficiencies. The user will be able to generate files
* of random numbers, and to select a set of algorithms to test on a file of random
* numbers.
*/
public class AlgorithmTester{
public static void main(String[] args) {
//This is where you will run the program to test your sorting algorithms.
}
}

View File

@@ -0,0 +1,5 @@
package Sorting;
public class InsertionSorter extends sorter{
}

View File

@@ -0,0 +1,10 @@
package Sorting;
/**
* This class will allow the user to make a file of random integers.
* The user will be able to select a file name, how many numbers are in the file,
* the minimum value generated, and the maximum value generated.
*/
public class RandomNumberFileMaker {
}

View File

@@ -0,0 +1,5 @@
package Sorting;
public class SelectionSorter extends Sorter {
//a class to sort an array of numbers using selection sort
}

10
Sorting/SortResult.java Normal file
View File

@@ -0,0 +1,10 @@
package Sorting;
/**
* This is a class to hold the efficiencty results of a sorter. We will use this
* because we can only have one return value from a method, but want to get more
* than one piece of data from each sorter.
*/
public class SortResult {
}

View File

@@ -1,7 +1,17 @@
package Sorting;
/**
* This is an abstract class, its subclasses will inherit its methods and instance
* fields. Any abstract methods will have to be implemented in the subclasses.
*/
abstract class Sorter {
//This is an abstract class
//In this class you will write an abstract sort() method
//the method will be implemented by subclasses
/**
* An abstract sorting method. Each subclass will have to implement its own
* version of this method.
* @return A SortResult object holding number of comparisons, number of swaps, and the sorted array
*/
public abstract SortResult sort();
}