Also available in: Polski
Sorting-Madness project for Software Engineering at Poznan University of Technology. The application implements 6 various sorting algorithms which can be used to sort different data sets using REST API and compare their sort times. Numeric data is sorted by standard, and text data - lexicographically. Strategy pattern was also implemented to select specific sorting method at runtime, as you can see in the UML diagram below.
The main goal of this project was to get to know the Scrum project management methodology (Sprint , Product Backlog ) and implement a REST API Java Spring Boot application with Maven which can be used by GET and POST requests. Additionally, Javadoc was created, the Strategy Pattern implemented and JUnit tests conducted.
The project is a standard Maven project. To run it from the command line, type mvn spring-boot:run
, and then use http://localhost:8080 address with POST or GET requests to sort the data.
You can also import the project to your IDE of choice as you would with any Maven project or just use the deployed version https://sorting-madness.herokuapp.com/.
http://localhost:8080/<list of sorting algorithms>/?numbers=<list of integers>
http://localhost:8080/insertion,bubble,merge/?numbers=5,4,3,2,1,4,2,5,6
http://localhost:8080/text/<list of sorting algorithms>/?strings=<list of strings>
http://localhost:8080/text/insertion,bubble,merge/?strings=kota,ma,ala
{
"sortingTypes": ["insertion", "bubble", "merge"],
"data": [5, 4, 3, 2, 1]
}
{
"sortingTypes": ["quick", "bubble", "insertion"],
"data": ["d", "e", "c", "b", "a"]
}
{
"sortingTypes": ["bubble", "quick", "insertion"],
"data": [
{
"a": 1,
"b": 5,
"c": "c"
},
{
"a": 3,
"b": 4,
"c": "a"
},
{
"a": 6,
"b": 2,
"c": "b"
}
],
"sortingAttribute": "a"
}