Quicksort First Screen

Quicksort Application

Before Sort

Before Quicksort

Result After Quicksort

Result after Quicksort

Quicksort for ArrayList of String Class Object

Class: FormatUI.java
Class: Contact.java
Class: Database.java
Class: QSsorting.java
Class: ContactUI.java
Class: QuickSortMain.java
Author: Shahrzad Jahangirian
Language: Java (using Java 8)
Date Added: January 7, 2019
Licence: My last addition to codes category was on Dec 2016 and now after 2 years and after one short term contract job as a Java Developer I am adding this Quicksort application today. As always all source codes are for showing my skills in Software Development to get me a Job as Java Developer, C++ Developer, Application Developer, Software Engineer, Analyst Programmer. You are not allowed to sell this Application or use my codes to develop an application for Sale or apply my codes to develop software for commercial use and profit. You can offer me a price to buy the Application for mass production or buy my codes to develop your application for profit.

Description: "As its name implies, quicksort is the fastest known sorting algorithm in practice. Its average running time is O(n log n). It is very fast, mainly due to a very tight and highly optimized inner loop. It has O(n2) worst-case performance, but this can be made exponentially unlikely with a little effort. The quicksort algorithm is simple to understand and prove correct, although for many years it had the reputation of being an algorithm that could in theory be highly optimized but in practice was impossible to code correctly. Like mergesort, quicksort is a divide-and-conquer recursive algorithm."[Weiss, Mark Allen. Data Structures & Algorithm Analysis in C++. Addison-Wesley, 2005.]

In reference to above extract, currently Quicksort is the fastest and most reliable sort algorithm in Software Development. I have coded the Quicksort algorithm in this application with Java language that ask user for a simple contact details of Surname, Name, and Phone number and save them in a file and then Quicksort the list by surname. I used Contact class with three String variables to keep each contact details and then each Contact saved in ArrayList of Contact class and then Quicksorted and also saved in a file for later use.

Below you find the Quicksort algorithm pseudocode from Wikipedia website at https://en.wikipedia.org/wiki/Quicksort

How to Run: I run this program in Windows 7 Command line Prompt with Java(TM) SE Runtime Environment 8 on my computer as you see above
Compile and Run it as below:
I assumed you saved all files at C:\javacodes then you need to compile following files on command prompt in exact following orders
C:\javacodes> javac FormatUI.java "compiles the FormatUI class"
C:\javacodes> javac Contact.java "compiles the Contact class"
C:\javacodes> javac Database.java "compiles the Database class"
C:\javacodes> javac QSsorting.java "compiles the QSsorting class"
C:\javacodes> javac ContactUI.java "compiles the ContactUI class"
C:\javacodes> javac QuickSortMain.java "compiles the QuickSortMain class"
C:\javacodes> Java QuickSortMain "and to run it"

Wallart Print for Sale
Class: FormatUI.java
FormatUI class adding needed properties for all Graphical User Interface(GUI) that I placed in this application screen. It is a utility class that I used for many of my Java Swing Applications.
Class: Contact.java
The Contact class keep details of a person with three variables of name, surname, and phone.
Class: Database.java
The Database class does the file processing.
Class: QSsorting.java
The QSsorting class is the brain of this application with quickSort_ArrayListOfClass(int low, int high) method that do the Quicksort.
Class: ContactUI.java
The ContactUI class has the Graphical User Interface implementation.
Class: QuickSortMain.java
The Application starting point is at QuickSortMain class