Write a C++ program to serve as the database for some number of students. The maximum number of students in the database will be defined as a global variable in your program and can be changed to suit different number of students. You will read the students' information from an input file. On the first line of the input file. you will have the number of students. Each student will have the following information stored for him/her: 1) Last Name (array of characters with length 15 or less) 2) First Name (array of characters with length 15 or less) 3) e-mail address (array of characters with length 30 or less) 4) Street Address (aray of characters with length 20 or less) 5) City (array of characters with length 20 or less) 6) State (array of characters with length 2) 7) Zip Code (array of characters with length 5) 8) Phone Number (array of characters with length of 10) Here is what your program will do: a) populate the database, i.e., read the input file and store the data. You may use a class or a struct to store each student's data. Thus, to store the data for more than one student, you will need an array of structs or classes, depending on the choice you have made. b) Once you have stored the data, your program should provide the following options: 1) Display the list of all students with their information 2) Display the information for students with a requested last name, thus with this option, you will ask the user to input a last name. 3) Display all the users who have e-mail addresses with a requested provider, for example: aol.com. Thus, with this option, the user enters the provider's information, for example, aol.com. 4) Display all students with a requested area code, i.e. the user enters an area code with this option. 5) Display all students from a requested city, thus, the user provides a city name with this option.
Write a C++ program to serve as the database for some number of students. The maximum number of students in the database will be defined as a global variable in your program and can be changed to suit different number of students. You will read the students' information from an input file. On the first line of the input file. you will have the number of students. Each student will have the following information stored for him/her: 1) Last Name (array of characters with length 15 or less) 2) First Name (array of characters with length 15 or less) 3) e-mail address (array of characters with length 30 or less) 4) Street Address (aray of characters with length 20 or less) 5) City (array of characters with length 20 or less) 6) State (array of characters with length 2) 7) Zip Code (array of characters with length 5) 8) Phone Number (array of characters with length of 10) Here is what your program will do: a) populate the database, i.e., read the input file and store the data. You may use a class or a struct to store each student's data. Thus, to store the data for more than one student, you will need an array of structs or classes, depending on the choice you have made. b) Once you have stored the data, your program should provide the following options: 1) Display the list of all students with their information 2) Display the information for students with a requested last name, thus with this option, you will ask the user to input a last name. 3) Display all the users who have e-mail addresses with a requested provider, for example: aol.com. Thus, with this option, the user enters the provider's information, for example, aol.com. 4) Display all students with a requested area code, i.e. the user enters an area code with this option. 5) Display all students from a requested city, thus, the user provides a city name with this option.
Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 3PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 6 images
Knowledge Booster
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.Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,