Question
This is my code. import static org.junit.Assert.*; import org.junit.*; import java.util.*; public class StudentSortSearchTest { //@Test public static void testSort(ArrayList arrA, StudentSortSearch.SortSearchCriteria criteria){ ArrayList students
This is my code.
import static org.junit.Assert.*;
import org.junit.*;
import java.util.*;
public class StudentSortSearchTest {
//@Test
public static void testSort(ArrayList
ArrayList
//Test to see if it is being sorted by name or by age
if(criteria == StudentSortSearch.SortSearchCriteria.AGE){
students.add(new Student("Mike", "Jones", 18));
students.add(new Student("Mohamed", "Ali", 19));
students.add(new Student("John", "Smith", 21));
students.add(new Student("Brittney", "Spears", 30));
assertArrayEquals(arrA.toArray(), students.toArray());
}else{
students.add(new Student("Brittney", "Spears", 30));
students.add(new Student("John", "Smith", 21));
students.add(new Student("Mike", "Jones", 18));
students.add(new Student("Mohamed", "Ali", 19));
assertArrayEquals(arrA.toArray(), students.toArray());
}
}
public static void testMergesort(ArrayList
testSort(arrA, criteria);
}
public static void testQuicksort(ArrayList
testSort(arrA, criteria);
}
public static void testBinarySearch(Student stu1){
Student stuA = new Student("Brittney", "Spears", 30);
assertEquals(stu1,stuA);
}
}
But when I run it I keep getting this error: error: cannot find symbol
How can I fix this?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started