Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Intern Queue Sorter (Java)

Overview

This project is a console-based sorting program written in Java.
It allows users to input complaint priority levels and sorts them using either Selection Sort or Bubble Sort. The program then outputs the lowest three priorities to represent the intern queue.

Features

  • Parse user input of priorities (comma-separated integers)
  • Choose sorting algorithm:
    • Selection Sort (default)
    • Bubble Sort
  • Validate input format
  • Ensure at least 3 priorities are provided
  • Display the lowest three priorities after sorting

File Structure

  • InputParser.java → Parses comma-separated input into integer arrays
  • ComplaintService.java → Provides logic to get the lowest three priorities
  • SelectionSort.java → Implements selection sort algorithm
  • BubbleSort.java → Implements bubble sort algorithm
  • SortStrategy.java → Interface for sorting strategies
  • InternQueueSorter.java → Main program with CLI options

How to Run (Windows CMD)

  1. Open Command Prompt and navigate to the folder containing your files:
    cd C:\Users\YourName\InternQueueSorter\src
  2. Compile all Java files:
    javac *.java
  3. Run the program with input
    • Default (Selection Sort):
       java InternQueueSorter 10,8,2,6,4
    • Selection Sort:
       java InternQueueSorter --algorithm=selection 10,8,2,6,4
    • Bubble Sort:
      java InternQueueSorter --algorithm=bubble 10,8,2,6,4

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages