Central Washington University Black Lives Matter Resources Database Java Project

  1. BLMDB.java. This is the primary class, and it has a main method that is the driver for the whole thing. Luckily, this class seems to be mostly intact. Inside of it, it has an instance variable of the type RecordList. Take a look and see what methods this class calls, and see if you can figure out if it’s missing anything.
    1. Also in BLMDB there’s a runAllTests() method but it seems to be empty. You’ll have to fill it up with all the tests you can think of. It’s your job to figure out what you need to test for and figure out how to write tests that can make it clear on the console what tests passed and what didn’t. I STRONGLY encourage you to write tests as you go along and not just do it at the very end. If you want to, in the runAllTests() method, you might want to run a bunch of other little test methods that you write.
  2. RecordList.java. The RecordList is just an ArrayList of Records. (Thus, it’s top line is “public class RecordList extends ArrayList<Record>”) But it adds some methods that a regular ArrayList doesn’t have. In particular, it adds a method called sortBy(), in which you can tell it what criterion you want to use to sort it by. (For instance, if you want to sort the records by their description, you could call sortBy(“description”). If you want to sort by their identifier (like the name of the book), you could call sortBy(“identifier”).
    1. The sort she had was a version of Insertion Sort — which is good because Insertion Sort is a stable sort, and that’s important if you’re going to be sorting by multiple criteria. Luckily, Karen had found some code online somewhere for the Insertion Sort method, but unfortunately, the code she found was for sorting an array of ints, and you’ll be sorting an ArrayList of Records, so there will be some differences in the code.
    2. There are probably some other helper methods you’ll need here too.
  3. ArrayList.java. Of course, you can’t use Java’s built-in ArrayList, you need to build your own. (Sadly, Karen’s ArrayList was completely erased.) And your ArrayList needs to be generic, so that you can do things like “ArrayList<Record> r = new ArrayList<Record>();” If your ArrayList isn’t generic yet, you might want to start here.
    1. You also might want to add some methods to your ArrayList (or else to your RecordList) that help with your sorting method. For example, a common thing to do in a sorting method is to overwrite an element of an array: myArray[10] = newValue. You might need to write a method so that you can do something like myArrayList.overwrite(10, newValue);
    2. In general, if there are any methods called in Karen’s classes that look like they’re methods of ArrayList (or RecordsList), be sure you have them. If you don’t have them, create them.
    3. The ArrayList you use could be implemented with a Linked List or with a regular array that resizes when needed.
  4. Record.java. This one, luckily, looks fully intact. Take a look at it because it will help you understand other parts of the project. This is the parent class for OnlineRec, Book, and Movie. Notice that the Record class implements the CompareToByInterface.
  5. OnlineRec.java , Book.java, and Movie.java. These classes are children of the Record class, but they each add a little more information appropriate to the kind of records that they are. For example, the Book record adds an author and publication year. OnlineRec adds websiteURL. Movie adds a director and a year. These all have to implement the compareToBy method since they are all Records and Record implements CompareToByInterface.
  6. CompareToByInterface. Luckily this one is pretty intact as well. Check it out so you know how to build this method in the OnlineRec, Book, and Movie classes.
  7. BLM_resources.txt. This is the text file that holds the resources Karen found so far. See if you can figure out the format they need to be in, in order to be read by the BLMDB’s import-from-file method. You need to add some more sources to this file.

Due: Thursday

Solution:

15% off for this assignment.

Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!

Why US?

100% Confidentiality

Information about customers is confidential and never disclosed to third parties.

Timely Delivery

No missed deadlines – 97% of assignments are completed in time.

Original Writing

We complete all papers from scratch. You can get a plagiarism report.

Money Back

If you are convinced that our writer has not followed your requirements, feel free to ask for a refund.

× How can I help you?