Created: Oct 18, 2020 8:40 PM
Updated: Oct 18, 2020 9:27 PM
- This project would demonstrate sorting of arrays using different algorithms.
- It should be a MAVEN project.
- User should be given the option to select which algorithm they want to choose for the sorting of their arrays.
- You have the flexibility to randomly generate the array or take it from the user (developer preference).
- Different packages need to be used.
- Design Patterns - Factory - need to create a class which basically creates the sort at runtime as per user requirements.
- You should use logger to debug/trace your code and also adding the exceptions in that.
- Make sure to adhere to all SOLID principles and good coding conventions.
SortManager is the product of the first two weeks of my training at Sparta Global, in the Java Dev team. It encompasses concepts such as:
-
Exceptions
Both from
java.lang
and two custom built ones -
Interfaces
In our case two interfaces are used:
Sorter
andBinaryTree
-
Industry level design
The project aims to follow SOLID design principles
-
The four pillars of OOP
Abstraction, Inheritance, Encapsulation, Polymorphism
-
Nested Classes
The
Node
class inside the binary tree.
It also makes use of Maven as the dependency management and build tool, JUnit-Jupiter for unit testing, log4j2 for logging throughout the program.
It's main focus is around sorting algorithms and in particular:
- Bubble sort
- Merge sort
- Tree sort
Another thing that is explored is how each algorithm performs next to each other. Performance tests happen withing the testing section of the solution.
The project was built entirely using IntelliJ.
You need to have downloaded IntelliJ on your computer, either the community version or the ultimate one.
Then you need to clone the repo. For windows users, run the following command in Git:
git clone https://github.com/waLLxAck/Sparta-Global-SortManager/tree/master
Note: You can use IntelliJ for cloning, too.
Once you've done that, all you have to do is open up the project in the IntelliJ.
You can use the system to either learn from the design and/or coding conventions/implementation or to sort custom and randomly generated array of numbers.
- Add more sorting algorithms
- Add a user interface