Using OOP, write a C++ program that will read in a file ofnames. The file is called Names.txt and should be located in thecurrent directory of your program. Read in and store the names intoan array of 30 names. Sort the array using the selection sort orthe bubblesort code found in your textbook. List the roster ofstudents in ascending alphabetical order. Projects using globalvariables or not using a class and object will result in a gradesubmission of 0.
The Names used for the Names.txt are: Jackie, Sam, Bill, Tom,Mary, Paul, Zev, Barb, John, Sharon, Dana, Dominic, Steven,Padro,,Katey, Kathy, Darius, Angela, Mimi,Jesse
Kenny, Lynn, Hector, Brittany, Jenn, Joe, Chloe, Geena, Sylvia,Dean.
I tried this solution on this question and it had a lot oferrors.