C++ A teacher is requiring her students to line up in alphabetical order, according to their first names..For example, in one class Chapel, Christine would be at the front and Uhura, Nyota would be last. The program will get the names from a file using getline since the file name includes spaces. The names should be read in until there is no more data to read. The program should prompt the user for the file name and read the data from the file. Note that these names might include spaces; handle your input accordingly. The expected output is two names; do not show the entire file.  Do not use arrays or sorting for this problem

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter1: Database Systems
Section: Chapter Questions
Problem 11P: Using your schools student information system, print your class schedule. The schedule probably...
icon
Related questions
Question

C++

A teacher is requiring her students to line up in alphabetical order, according to their first names..For example, in one class Chapel, Christine would be at the front and Uhura, Nyota would be last. The program will get the names from a file using getline since the file name includes spaces. The names should be read in until there is no more data to read.

The program should prompt the user for the file name and read the data from the file. Note that these names might include spaces; handle your input accordingly. The expected output is two names; do not show the entire file. 

Do not use arrays or sorting for this problem.

Random names - Notepad
File Edit Format View Help
Thomas, Nora Ann
Macdonald, Elijah
Torres, Layla
Lynch, Hazel
Watson, Josiah
Reyes, Melanie Roxanne
Tomas, Mateo
Castro, Logan
McCarthy, Callie
Mercado, Miles
Williams, Hunter
Doyle, Paisley
O'Doherty, London
Ferrari, Carter Lee
Garcia, Zee
Morrison, Nevaeh
Kennedy, Dylan
Anderson, Carson
Tomas, David
Andrada, Lillian
Pedersen, Ivy
Wilson, Hailey
McCarthy, Stella
Salazar, Owen Richard
Johnson, Melanie Elizabeth
Jones, Adeline
Nilsen, Dominic
Robinson, Madison
Andanan
THAY
Transcribed Image Text:Random names - Notepad File Edit Format View Help Thomas, Nora Ann Macdonald, Elijah Torres, Layla Lynch, Hazel Watson, Josiah Reyes, Melanie Roxanne Tomas, Mateo Castro, Logan McCarthy, Callie Mercado, Miles Williams, Hunter Doyle, Paisley O'Doherty, London Ferrari, Carter Lee Garcia, Zee Morrison, Nevaeh Kennedy, Dylan Anderson, Carson Tomas, David Andrada, Lillian Pedersen, Ivy Wilson, Hailey McCarthy, Stella Salazar, Owen Richard Johnson, Melanie Elizabeth Jones, Adeline Nilsen, Dominic Robinson, Madison Andanan THAY
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning