Skip to content

Showmick119/Searching-and-Sorting-Algorithms

Repository files navigation

Programming Languages Ranking System

This project implements a system to rank programming languages based on various attributes, demonstrating key object-oriented programming concepts and algorithm implementations.

Project Overview

The system ranks programming languages like Python, C++, and Rust in a tabular format using randomly generated data. The implementation showcases:

  • Object-Oriented Programming principles (Inheritance, Polymorphism, Encapsulation)
  • Sorting algorithms (Merge Sort, Insertion Sort)
  • Binary Search implementation
  • Clean code practices with Javadoc documentation

Learning Experience: CI Workflow Implementation

As part of extending my learning, I implemented my first Continuous Integration (CI) pipeline using GitHub Actions. This experience taught me:

  • How to set up automated testing workflows
  • Working with JUnit 5 in a CI environment
  • Managing build and test dependencies without build tools
  • Understanding the importance of automated testing in software development

The CI pipeline automatically:

  1. Compiles all Java source files
  2. Runs JUnit tests on every push and pull request
  3. Reports build and test status

This hands-on experience with CI/CD practices has given me valuable insight into modern software development workflows and quality assurance practices.

Features

  • Merge Sort implementation
  • Insertion Sort implementation
  • Binary Search implementation
  • Custom Datapoint class for handling multi-column data
  • Generic type support for sorting and searching operations
  • Comprehensive JUnit tests for all algorithms
  • Continuous Integration via GitHub Actions

Usage

The project provides the following main classes:

  • SortAndSearch: Contains the implementations of sorting and searching algorithms
  • Datapoint: A class for handling multi-column data points with comparable functionality
  • Table: Manages collections of data points
  • DataProcessing: Handles data processing operations
  • TextEditor: Provides text editing capabilities

Testing

The project includes a comprehensive test suite using JUnit 5. Tests cover:

  • Merge Sort functionality
  • Insertion Sort functionality
  • Binary Search with various scenarios
  • Edge cases (empty lists, single-element lists)

To run the tests locally:

  1. Download JUnit Platform Console Standalone JAR
  2. Compile the source and test files
  3. Run the tests using the JUnit Platform Console
wget https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.9.2/junit-platform-console-standalone-1.9.2.jar
javac -cp junit-platform-console-standalone-1.9.2.jar:. *.java tests/*.java
java -jar junit-platform-console-standalone-1.9.2.jar --class-path tests:. --scan-class-path

About

Implementing searching and sorting algorithms in Java

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages