| | |
Help! I need a little help starting this project its my final
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
CIS350 Project
Choose one O(n log n) and one O(n2) sorting algorithm. Choose a third algorithm of any time complexity. For each of the three algorithms you have chosen, implement the algorithm.
Then, write a short piece of code that will generate the following:
1. A file of 1000 random integers
2. A file of 10000 random integers
3. A file of 100000 random integers
Run your three sorting routines and, using C++ library functions, time the execution of each of the three routines on the three data sets. Graph the results. Then, write a brief analysis and summary of the results.
Choose one O(n log n) and one O(n2) sorting algorithm. Choose a third algorithm of any time complexity. For each of the three algorithms you have chosen, implement the algorithm.
Then, write a short piece of code that will generate the following:
1. A file of 1000 random integers
2. A file of 10000 random integers
3. A file of 100000 random integers
Run your three sorting routines and, using C++ library functions, time the execution of each of the three routines on the three data sets. Graph the results. Then, write a brief analysis and summary of the results.
•
•
Join Date: Jan 2008
Posts: 3,822
Reputation:
Solved Threads: 501
•
•
•
•
CIS350 Project
Choose one O(n log n) and one O(n2) sorting algorithm. Choose a third algorithm of any time complexity. For each of the three algorithms you have chosen, implement the algorithm.
Then, write a short piece of code that will generate the following:
1. A file of 1000 random integers
2. A file of 10000 random integers
3. A file of 100000 random integers
Run your three sorting routines and, using C++ library functions, time the execution of each of the three routines on the three data sets. Graph the results. Then, write a brief analysis and summary of the results.
http://www.daniweb.com/forums/announcement8-2.html
Search for quick sort and bubble sort , this will help you finish your final year project assignment.
•
•
Join Date: Sep 2008
Posts: 55
Reputation:
Solved Threads: 6
Try and start it at least. I think an array of a bunch of numbers would work fine, user inputs the amount of numbers to be generated (to show your professor it works you can input 1000, 10000, and 100000) and then the output is a bunch of numbers from the array.
Sir, they have us surrounded; those poor bastards
•
•
Join Date: Sep 2008
Posts: 36
Reputation:
Solved Threads: 0
try the following for a buble sort Ascenting. I think that will help you.All im doing is swaping the values, just like a swap algorithm.
Happy Coding!
Happy Coding!
C++ Syntax (Toggle Plain Text)
private: System::Void btnSort_Click(System::Object^ sender, System::EventArgs^ e) { lsv->Items->Clear(); int temp; String^ Stemp; float ftemp; for ( int i = 1;i < Employee_sum;i++ ) { for ( int j = Employee_sum- 1; j >= i; j--) { if ((employee[j-1]->GetAFM()) > (employee[j]->GetAFM())) { temp = employee[j-1]->GetAFM(); employee[j-1]->SetAFM(employee[j]->GetAFM()); employee[j]->SetAFM(temp); Stemp = employee[j-1]->GetLName(); employee[j-1]->SetLName(employee[j]->GetLName()); employee[j]->SetLName(Stemp); Stemp = employee[j-1]->GetFName(); employee[j-1]->SetFName(employee[j]->GetFName()); employee[j]->SetFName(Stemp); temp = employee[j-1]->GetSalary(); employee[j-1]->SetSalary(employee[j]->GetSalary()); employee[j]->SetSalary(temp); ftemp = employee[j-1]->GetTax(); employee[j-1]->SetTax(employee[j]->GetTax()); employee[j]->SetTax(ftemp); ftemp = employee[j-1]->GetIKA(); employee[j-1]->SetIKA(employee[j]->GetIKA()); employee[j]->SetIKA(ftemp); ftemp = employee[j-1]->GetTEBE(); employee[j-1]->SetTEBE(employee[j]->GetTEBE()); employee[j]->SetTEBE(ftemp); ftemp = employee[j-1]->GetNet(); employee[j-1]->SetNet(employee[j]->GetNet()); employee[j]->SetNet(ftemp); } } } }
•
•
Join Date: Sep 2008
Posts: 36
Reputation:
Solved Threads: 0
try the following for an Ascenting buble sort . I think that will help you.All im doing is swaping the values, just like a swap algorithm.
Happy Coding!
[/QUOTE]
Happy Coding!
C++ Syntax (Toggle Plain Text)
private: System::Void btnSort_Click(System::Object^ sender, System::EventArgs^ e) { lsv->Items->Clear(); int temp; String^ Stemp; float ftemp; for ( int i = 1;i < Employee_sum;i++ ) { for ( int j = Employee_sum- 1; j >= i; j--) { if ((employee[j-1]->GetAFM()) > (employee[j]->GetAFM())) { temp = employee[j-1]->GetAFM(); employee[j-1]->SetAFM(employee[j]->GetAFM()); employee[j]->SetAFM(temp); Stemp = employee[j-1]->GetLName(); employee[j-1]->SetLName(employee[j]->GetLName()); employee[j]->SetLName(Stemp); Stemp = employee[j-1]->GetFName(); employee[j-1]->SetFName(employee[j]->GetFName()); employee[j]->SetFName(Stemp); temp = employee[j-1]->GetSalary(); employee[j-1]->SetSalary(employee[j]->GetSalary()); employee[j]->SetSalary(temp); ftemp = employee[j-1]->GetTax(); employee[j-1]->SetTax(employee[j]->GetTax()); employee[j]->SetTax(ftemp); ftemp = employee[j-1]->GetIKA(); employee[j-1]->SetIKA(employee[j]->GetIKA()); employee[j]->SetIKA(ftemp); ftemp = employee[j-1]->GetTEBE(); employee[j-1]->SetTEBE(employee[j]->GetTEBE()); employee[j]->SetTEBE(ftemp); ftemp = employee[j-1]->GetNet(); employee[j-1]->SetNet(employee[j]->GetNet()); employee[j]->SetNet(ftemp); } } } }
![]() |
Similar Threads
- Final Year Project help!!! (Computer Science)
- I need some ideas for my graduation project (Computer Science)
- FYP Project Ideas... (Computer Science)
- last year degree hons project CA computer applications (Computer Science)
- Computer Science Final Year Project Ideas (Computer Science)
- please help final year project (Computer Science)
- Final Year Project! Please help! (Computer Science)
- Starting project (PHP)
- Final Year Project [Proposal] (Computer Science)
Other Threads in the C++ Forum
- Previous Thread: comparing stings to string array values
- Next Thread: Dynamic array of pointers to structures - doubt
| Thread Tools | Search this Thread |
api array arrays based beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news number output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






