Using OOP, write a C++ program that will read in a file of names. The file...

50.1K

Verified Solution

Question

Programming

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.

Answer & Explanation Solved by verified expert
3.7 Ratings (640 Votes)
includeincludeusing namespace stdclass readnameclass readName    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students