C++ Program that implements the Bubble sort algorithm.

Hello, I am doing a class project in which I need to create a C++ class to implement the Bubble sort algorithm.
I will need to create a class with the following methods:
1. getData(fileName): which will read a data from a file into an array.
2. bubbleSort(): which will sort the data in the array.
3. writeData(fileName): which will write the data in the array to the file.
The class should have an array to store the data and the count of items in the array

I also need to use the following main code to test the class:

int main(){
Bubble obj1;
obj1.getData("source.txt");
obj1.bubbleSort();
obj1.writeData("result.txt");
}

Can anyone help me with this please?
Please note that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.
well unlike chicofeo here who thinks he knows everything I will try to help you the best I can, however I will need you to do start it by doing some of the code yourself. Do you have an idea of how to start the program?? Do you know what classes are or what sorting is??
Last edited on
@jose23567, thanks for the kind words.

Topic archived. No new replies allowed.