Recent Feedback
I would like some advice please. I have to create a Java program that has three types of sorts - Quicksort, Shell Sort and Bubble sort. I have to run these sorts on 5 different sized arrays, with a complete, partial and random array. I also have to make visualization applets.
Optional Information: Language (or Software): Other Already Tried: Right now I'm trying to figure out the logic of everything to start writing the program. I want to make sure I'm on the right track.
Hello and welcome to JustAnswer. I look forward to assisting you today with your question and providing the best answer possible.Hi there,I can help you with simole console based codes for all three sorting methods for arrays.I will not be able to help with visualization applet.Will that be fine with you?
Anything to get started would be helpful.
Ok by when do you need the code?
Is tomorrow too soon? I can copy all of the directions to you? I don't want you to do the assignment - just to get me started with the logic and the code....
Yes post the complete assignment here and I will help you to get started with it.
The three sorts I have are Quicksort, Shell Sort and Bubble Sort.
Unit 3 Final Project Description
Sorting is a fundamental topic in Computer and Information Science. Due to the pervasiveness of the topic, there are a number of standard algorithms that people choose when a sort is required. As with any set of solutions to a problem, there are advantages and disadvantages of each.
The purpose of this project is to expose you to various sorting techniques, while at the same time allowing you to study the characteristics of those techniques that make them advantageous (or disadvantageous) to use.
Instructions:
Design an OO framework that will allow you to study multiple sorts. All of the objects in the sorting framework will need to sort the same array of data and time the results. After you have run your program on data with different characteristics, you will need to write a report detailing your results.
To see how well the sorts work, you must sort arrays of varying sizes. These sizes are: 10 elements, 50 elements, 100 elements, 500 elements, and 1000 elements. For each of these array sizes, you will have to use one array that is already sorted, another array that is partially sorted, and one that is random. Create a table containing the runtime of each of the sorts when sorting these combinations. The following table provides an example of the test runs you will need to make for each sort:
# XXXXX
Fully Sorted
Partially Sorted
Random
10
50
100
500
1000
Deliverables:
1. Due in Unit 4: An OO program that implements Quicksort and two other sorts. One should have a worst case time of O(n2), and the other can be any sort of your choice. (Note: as a starting point, see http://en.wikipedia.org/wiki/Sorting_algorithm ).
2. Due in Unit 5: A paper describing the sorts you implemented and your results. Please site any references using APA.
Grading Scale for Final Project:
Extra Credit:
Visualizing solutions is a powerful tool for learning. For extra credit, anyone who can visualize the sorts in progress will receive an additional 20%. Examples of these visualizations will be provided to you.
Ok got your question.Now what kind of help you need in this.I mean you need to understand how this sorting takes place?ORyou need code for all three kind of sorting?ORyou need the complete code implementing all three sorting mentioned?
I need to figure out how to lay it all out and get started with the code. I asked my professor questions, and basically, from what I understand I need to create a abstract super class that has each of the sorts as a subclass and the arrays under that. I'm not quite sure how the sort needs to take place in Java.
Ok i will explain you everything what he ment but can I help you by tomorrow morning.Will that be fine with you?
Yes. I actually will not be home from work until about 8:00 PM EST. Will you be online then?
Dont worry i will keep the explaination ready by than for you along with the base which you can use for your java code.I would like to ask do you know how to compile multifile programs in your compiler?
Yeah - I just type the following import.model.filename;Correct? FYI - I am using Eclipse as my IDE.
No not like that.Its like when you create a project and put many. Java files in it. And one java file contains main method which we use to run and get the output part.Anyways if you have problem with multifile than no problem i will provide help by implementing all the class ij simple. Java file. As oer your convineance.
I do know how to create packages and classes and things. I also know how to kind of create the main program and get the output.
Ok than, because you know the above parts, half the work is already dine.Have a Good Day.
I am home from work now - were you able to put something together for me?
Yes I have the document in MS Word file.Do let me know when you are online.
Ok,As I told you I will be preparing an document explaining how the three asked sorting methods work along with the code.So, Please download the document prepared along with the function for the sort from link below:http://www.mediafire.com/?gducvzemboo49i8----------------------------------------------------------------------------------------------------------------If solution provided by me is satisfactory than don't forget to hit the GREEN ACCEPT Button because thats how we get paid for our efforts.Positive Feedback and BONUS are always appreciated.Thank You and Have a Good Day.----------------------------------------------------------------------------------------------------------------Remember, if for any reason you are unsatisfied with my answer, we can continue the conversation until you’re satisfied and Accept my answer. I can address follow up questions at no extra charge and I’m always here to help. Thank you for using JustAnswer!
Thank you for the information. If you are online and available, please let me know as I have a question about the information. Thank you.
Yes I am Online.You can ask now?
Yes, can we chat for a few minutes. It would be faster.
We can't chat now because it is possible only when you start a new Question.Remember, if for any reason you are unsatisfied with my answer, we can continue the conversation until you’re satisfied and Accept my answer. I can address follow up questions at no extra charge and I’m always here to help. Thank you for using JustAnswer!
Oh, I wasn't aware you could only chat with a new question. I appreciate the code that you sent. With the questions in mind, there are actually 45 total sorts to this problem. Is there a way to write one bubblesort that runs through all of the different parameters for the array size and the variations on the sorting mechanisms?
Yes,If you will see the function i provided for bubblesort.You can specify the size of n as size of array or uptill which you want to sort.like suposse if i have an array of size 10 i will send n value as 10If i have array of size 100 i will send n value as 100If i have array of size 100 but i want to sort only first 20 than i will send n as 20.Was I able to make you understand your requirement??Remember, if for any reason you are unsatisfied with my answer, we can continue the conversation until you’re satisfied and Accept my answer. I can address follow up questions at no extra charge and I’m always here to help. Thank you for using JustAnswer!
So for each size array I have to do another subclass with a different name, and the same thing for each one of the ways I want to sort? The directions specify, "These sizes are: 10 elements, 50 elements, 100 elements, 500 elements, and 1000 elements. For each of these array sizes, you will have to use one array that is already sorted, another array that is partially sorted, and one that is random."So for the Bubblesort - I will have the same code 15 times, just changing the numbers of the array size, and qualifying whether or not it is already sorted, partially sorted, or random?
No you are getting it wrong.First of all code will be same for all so Code apperiance will be only Once.The size will be decided only when you call the function.And since function is not working for any fixed size and can work for any size specified as n.So Code will be once and if to be run for 15 variables/arrays than code will be called 15 times.Got it?Remember, if for any reason you are unsatisfied with my answer, we can continue the conversation until you’re satisfied and Accept my answer. I can address follow up questions at no extra charge and I’m always here to help. Thank you for using JustAnswer!
Ok, so I use the main program to call the different sorts the 15 times?
Yes Perfect.I think you understood this time.Remember, if for any reason you are unsatisfied with my answer, we can continue the conversation until you’re satisfied and Accept my answer. I can address follow up questions at no extra charge and I’m always here to help. Thank you for using JustAnswer!
Experience: BE CS, 4+ Experience in Programming and Database (ERP)
Ok, I'm going to accept your answer. I may have follow-up questions though. I hope you will be available for them.
No Problem.Even if I am not online in future leave here the message or problem and I will reply as soon as possible for me.
Thank you!
You are welcome
Hi, please let me know if you are arround. I have an error in the code that I can't get rid of and I'm having difficulty figuring out how to call the sorts into my main program. Thank you.
yes i am around.post the code you have done yet using www.wikisend.com
Ok - The code in the MasterSort class is there because I'm want to keep the output stuff something similar. I don't know how to start calling all the different levels of the arrays and the Quicksort one has an error.
Did you get it? http://wikisend.com/download/485008/FinalProject.zip
OkI will give you a sample code describing you how to implement quicksort in your program.please download the sample code for the code i provided you containing quicksort algorithm implementation.http://wikisend.com/download/486524/Sorting.javaRead carefully the coments I have written in Main Function at the end.
Thank you. I will play with everything and see what I can do.
Ok Thats Great.Have fun with coding.Have a Good Day.
Hi Raj - are you around? I have one final thing that is needed. I actually have to time the sorts, and I'm not sure how to do that.
Actually i am travelling so will be helping you when i reach back home.
Ok - let me know when you are back and I will send you my code.