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
icon
Related questions
Question
student .
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
File Edit Format View Help
Doe
John
johndoe@goodheaven.net
678 Lucky Street
Boone
NC
28607
8288888888
information stored for him/her:
Soccerlover
Tom
soccerlover@mls.com
678 Unlucky Street
Boone
NC
28608
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 (array 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)
8289999999
Here is what your program will do:
Doe
Jan
jandoe@goodheaven.net
678 Hisbrother Street
Boone
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.
NC
28608
8287777777
Soccerlover
Jannet
jannet@mls.com
678 Unlucky Street
Boone
NC
28608
8289999999
Use the student input file.
Transcribed Image Text:student . 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 File Edit Format View Help Doe John johndoe@goodheaven.net 678 Lucky Street Boone NC 28607 8288888888 information stored for him/her: Soccerlover Tom soccerlover@mls.com 678 Unlucky Street Boone NC 28608 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 (array 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) 8289999999 Here is what your program will do: Doe Jan jandoe@goodheaven.net 678 Hisbrother Street Boone 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. NC 28608 8287777777 Soccerlover Jannet jannet@mls.com 678 Unlucky Street Boone NC 28608 8289999999 Use the student input file.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 6 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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,