public class ThreeNumberSort
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
first
order of the numbers (0-2)
|
double[] |
numbers
the three numbers
|
int |
second
order of the numbers (0-2)
|
int |
third
order of the numbers (0-2)
|
Constructor and Description |
---|
ThreeNumberSort()
constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getIndexOfLargestNumber()
get input index of largest number
|
int |
getIndexOfSmallestNumber()
get input index of smallest number
|
double |
getLargestNumber()
get largest number
|
double |
getSmallestNumber()
get smallest number
|
void |
sort(double n0,
double n1,
double n2)
sort three doubles
|
public double[] numbers
public int first
public int second
public int third
public int getIndexOfLargestNumber()
public int getIndexOfSmallestNumber()
public double getSmallestNumber()
public double getLargestNumber()
public void sort(double n0, double n1, double n2)
n0
- first doublen1
- second doublen2
- third double