Transcribed TextTranscribed Text

1. Compression and Cryptography – Create Interface 1 to input a file to be compressed and encrypted, the development to save files will be done in future PAs. – Create Interface 2 so the input encrypted/compressed files can be recovered in future PAs. – No need to implement the compression and cryptography methods, simply generate the components. – Make sure to comment your code where the specific methods will be within your code. 2. Tic – Tac – Toe – Add an interface allowing the user to select the method to play against. Just added to the existing UI that already exists. If you choose to build your own UI that is acceptable. To begin adding intelligence to your game, start with the following two methods – Best Move (Provided) – Implement a method that uses conditional statements. The conditional statements will determine the current state of the board prior to making a move. So how you do this is up to you, however at a minimum you need the following checks:  1 st check to see if a win move is available and take it to win or block it so your opponent does not win.  2 nd your move must connect two of your pieces if available and allows a potential win.  3 rd make any random legal move using the built in random method in Java. 3. Web Crawling & Str. Mat. - Implement a Web Crawling interface for BFS and a crawler of your choice.  Each method should be in its own Java class  No need to implement the crawler simply set it up - Add the ability to select one of four String Matching methods such as naïve string matching, the Knuth-Morris-Pratt algorithm, String-matching automata, and Rabin-Karp algorithm.  Each method should be in its own Java class  Only implement one of the methods from your HW 2 pseudo code  The implementation does not need to check a web page text to compare against.  Rather, simply implement the matching method and allow a string to be compared against several characters, e.g., compare a string against a paragraph. This can be done as a separate class. - Comment your code where the crawler will be and the string matching techniques

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

import java.util.*;

public class InputFileExample implements InputFileInterface {

// Method to compress file
public void compressFile(String input, String output) {
    GZIP.compressGzipFile(input, output);

// Method to encrypt file
public void encryptFile(String input, String output) {
    try(BufferedReader br = new BufferedReader(new FileReader(input))) {
      FileWriter out = new FileWriter(output);
      for(String line; (line = br.readLine()) != null; ) {
       out.write(CaesarCipher.encrypt(line, 7));
    } catch (Exception e) {

// Method to encrypt and compress file
public void encryptAndCompressFile(String input, String output) {
    File f = new File("temp");

public static void main(String[] args) {
    if (args.length != 2) {
      System.out.println("ERROR: Incorrect # of input arguments");
      System.out.println("InputFileExample <input> <output>");

By purchasing this solution you'll be able to access the following files:, and

50% discount

$75.00 $37.50
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats