Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

This is a remote repository for all of my UMass Boston Advanced Algorithms (CS310) class projects

Notifications You must be signed in to change notification settings

BrendanNguyenCS/umasscs310projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UMass Boston CS310 (Advanced Algorithms)

This is a remote repository for all my CS310 class projects and other associated files. This repository contains my solutions for each of the programming assignments (PAs) and homework assignments. View at your own discretion as answers may not be correct.

Note:

The file structure of this repository has been modified since its creation. This project now uses Maven as the framework. The following instructions should still work, but the most optimal way to run this code is using the internal run commands in the IntelliJ IDEA IDE. This decision was made in order to be able to create unit tests, similar to commercial software development.

Compiling the Code

In order to compile the code, cd to the src folder (or where the root of your source code is) and run the following command. This example compiles code from PA1.

javac -d ../classes pa1/*.java

This will compile all Java files in project 1 and put the .class files in the ../classes/project subdirectory.

Running Programs

In order to run programs, cd to the classes subdirectory and run the following command. The Windows command is shown, other OS's will replace ; to :. This also loads in the algs4 library in order to utilize its objects. The example below runs the Markov Model program.

java -cp .;../lib/algs4.jar pa1.MarkovModel 2 pa1/example.txt

Note that the input file being passed into MarkovModel is the file's relative path. It won't work if this isn't the case. Another helpful tip: for PA3, the programs utilize classes that allow you to work with binary data. You can test those programs while also printing out the binary output at the same time.

java -cp .;../lib/algs4.jar pa3.MoveToFront - pa3/abra.txt | java -cp .;../lib/algs4.jar edu.princeton.cs.algs4.HexDump 16

The above command will print both the output for the program and the binary output of HexDump.

About

This is a remote repository for all of my UMass Boston Advanced Algorithms (CS310) class projects

Topics

Resources

Stars

Watchers

Forks

Languages