Skip to content

Tianfeng-Chen/COMP257-Final-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e396e6e · Dec 15, 2022

History

13 Commits
Dec 15, 2022
Dec 15, 2022
Dec 15, 2022

Repository files navigation

COMP257 Final Project

This is the repo for my final project. This project is trying to solve the longest increasing subsequence problem with three different algorithms: Brute Force, Dynamic Programming, and Greedy. The project will run different size of test cases on these algorithms and track their runtimes. This project will provide line chart to visualize the result as well.

Content

Repo Instruction

Code Explanation

Repo Instruction

The necessary documents, including final project report, result screenshots, and runtime plot, are located in Document folder.

The source code is written in Java and the project is located in LongestIncreasingSubsequence folder. In this folder, you can find all the source code under src folder. For more details of the source code, you can find in the Code Explanation section.

Code Explanation

The code has four parts: Controller, Model, Utility, and UnitTest

Controller

The controller is the main gate of the whole project. The controller contains all necessary functions to control the different algorithm. For example:

LongestIncreasingSubsequence.runBruteForceSolution(int[] input)

The user can easily use these methods to invoke these algorithms and the controller can make the project flexible. Currently, the controller provides methods for users to run the algorithm with different inputs, and calculate the runtime for different algorithms.

Model

The model is the part that contains different algorithms. The Solution object is the base model object for all others algorithms' objects. Each algorithm object contains the specific algorithm to solve this issue.

Utility

The Util part contains the necessary utilities for models or have other purposes. In this folder, the RuntimePlot object is used to generate the runtime plot with the help of JavaFX. The TestCases object contains all the test cases for the unit test.

Test

The test of this object utilized the JUnit framework to do the test. The structure of the test is each test runs a test case for all the algorithms. All of these algorithms should have the same result. Each test will print the runtime for each algorithm as well. The user can find the result in console.


For more information or if you have any questions, please contact me!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages