CMSC 350 Homework 1 Create a class that can be used to test data structure…

$25.00

Category:

Description

CMSC 350 Homework 1 Create a class that can be used to test data structure- similar to the StudentA.java example found shown below: StudentA.java import java.util.Scanner; import java.util.ArrayList; class StudentA implements Comparable { static java.util.Random rn = new java.util.Random (); static ArrayList firstNames = new ArrayList <(); static ArrayList import java.util.*; import junit.framework.TestCase; //So we can see the list objects being created, //and keep track of when they are cleaned up: class CountedList extends ArrayList { private static int counter = 0; private int id = counter++; public CountedList() { System.out.println(“CountedList #” + id); } public int getId()

CMSC 350 Homework 1 Create a class that can be used to test data structure – similar to the StudentA.java example found shown below: StudentA.java import java.util.Scanner; import java.util.ArrayList; class StudentA implements Comparable { static java.util.Random rn = new java.util.Random (); static ArrayList firstNames = new ArrayList <(); static ArrayList import java.util.*; import junit.framework.TestCase; //So we can see the list objects being created, //and keep track of when they are cleaned up: class CountedList extends ArrayList { private static int counter = 0; private int id = counter++; public CountedList() { System.out.println(“CountedList #” + id); } public int getId()