sorting and searching with bubbelsort (GUI

Hey.
Need help with my final school assignment in c + + course! I'll make a program that consists of "sorting and searching." To cope with the task, it should contain this: Create a field containing 50 random
numbers, sort them by a method
sort according to Bubble sort and then
out the field before and after sorting.
(Design: http://gyazo.com/507c94ed7f08c84399f192ecede869b6 )

Please help!
/Swedish guy.
I am surprised that your assignment is supposed to be a GUI program.

According to the assignment, it should look something like this:

+------------------------------------------------------------------+
|# chh9607moment11                                           _ O X |
+------------------------------------------------------------------+
| Random numbers                                                   |
| +--------------------------------------------------------------+ |
| | 7 24 19 -3 44 82 ...                                         | |
| +--------------------------------------------------------------+ |
|                                                                  |
| Sorted numbers                                                   |
| +--------------------------------------------------------------+ |
| | -3 -1 0 1 2 4 5 7 13 19 22 24 ...                            | |
| +--------------------------------------------------------------+ |
|                                                                  |
| +------------------+  +------------------+  +------------------+ |
| | Generate Numbers |  |       Sort       |  |       Quit       | |
| +------------------+  +------------------+  +------------------+ |
+------------------------------------------------------------------+

You don't actually need the buttons at the bottom, even.

The bubble sort algorithm is explained here:
http://www.cplusplus.com/faq/sequences/sequencing/sort-algorithms/bubble-sort/

Good luck!
Topic archived. No new replies allowed.