Your client wishes to have a program that would generate a student database in a form of Excel spreadsheet. In order to save a record to the spreadsheet, client will enter student data at the prompt, one record at a time.Every record in the database is represented by student data; record number, first name, last name, ID, GPA. Your assignment is to write the program that would get user input, one line at the time, and write them to a Comma Separated Values file. In addition, the program will need to save student record as a single string to a vector of strings, one record at a time. When user is done entering records, program should display all the lines entered by the user to the screen. Things to consider when implementing the program: 1.write_file(vector &v): (1)Open file for writing (2)check if file can be open for writing (due to memory problems) (3)Prompt user to enter student records. NOTE: number of records is unknown, so program must repeatedly prompt user for input until the user enters “quit”. To make this work, extract only the first word from standard input stream buffer (this would be the student’s last name) and check it is “quit”. (4)Extract the rest of the values from standard input stream: first name, student id, and gpa. (5)use DO-WHILE loop to get user input (6)use output string stream to write to the CSV file (7)NOTE: you should also insert record number to before the student record (figure out how to do that). (8)Add student record to the vector passed in by reference (meaning that the function will modify the original vector) (9)close filewhen user enters “quit” 2.print_student_info(vector &v) 3.main( )Main function should integrate both the helper functions described above to solve the given problem.NO GLOBAL variables, all variables should be local. Main should print program title, call write_file( ) and print_student_info( ) functions, and print content of the vector to the console. At the end, program should remind user to check student_database.csv file by opening it with Microsoft Excel With this assignment, can you write it in C++ and can you also include string streams as well?

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Your client wishes to have a program that would generate a student database in a form of Excel spreadsheet. In order to save a record to the spreadsheet, client will enter student data at the prompt, one record at a time.Every record in the database is represented by student data; record number, first name, last name, ID, GPA. Your assignment is to write the program that would get user input, one line at the time, and write them to a Comma Separated Values file. In addition, the program will need to save student record as a single string to a vector of strings, one record at a time. When user is done entering records, program should display all the lines entered by the user to the screen.

Things to consider when implementing the program:

1.write_file(vector<string> &v):

(1)Open file for writing

(2)check if file can be open for writing (due to memory problems)

(3)Prompt user to enter student records. NOTE: number of records is unknown, so program must repeatedly prompt user for input until the user enters “quit”. To make this work, extract only the first word from standard input stream buffer (this would be the student’s last name) and check it is “quit”.

(4)Extract the rest of the values from standard input stream: first name, student id, and gpa.

(5)use DO-WHILE loop to get user input

(6)use output string stream to write to the CSV file

(7)NOTE: you should also insert record number to before the student record (figure out how to do that).

(8)Add student record to the vector passed in by reference (meaning that the function will modify the original vector)

(9)close filewhen user enters “quit”

2.print_student_info(vector<string> &v)

3.main( )Main function should integrate both the helper functions described above to solve the given problem.NO GLOBAL variables, all variables should be local. Main should print program title, call write_file( ) and print_student_info( ) functions, and print content of the vector to the console. At the end, program should remind user to check student_database.csv file by opening it with Microsoft Excel

With this assignment, can you write it in C++ and can you also include string streams as well?

**Contents of student_database.csv After Execution**

The table below represents the contents of a CSV file named `student_database.csv` following its execution. This data provides a snapshot of student records, including essential academic information as organized into distinct columns.

| **Record #** | **Last Name**  | **First Name** | **Student ID** | **GPA** |
|--------------|----------------|----------------|----------------|---------|
| 1            | Rockwell       | Olivia         | 12345          | 4.0     |
| 2            | Hall           | Alexander      | 23456          | 3.5     |
| 3            | Martinez       | Jose           | 34567          | 2.8     |
| 4            | McMillan       | Steven         | 45678          | 3.6     |
| 5            | Wiseman        | Christopher    | 98765          | 3.2     |
| 6            | White          | Sarah          | 87654          | 4.0     |

**Details:**

- **Record #**: A sequential identifier for each student record.
- **Last Name**: The surname of the student.
- **First Name**: The given name of the student.
- **Student ID**: A unique identifier assigned to each student.
- **GPA**: The student's Grade Point Average, reflecting their academic performance.

This table is useful for educational institutions to track student information and assess academic performance via GPAs.
Transcribed Image Text:**Contents of student_database.csv After Execution** The table below represents the contents of a CSV file named `student_database.csv` following its execution. This data provides a snapshot of student records, including essential academic information as organized into distinct columns. | **Record #** | **Last Name** | **First Name** | **Student ID** | **GPA** | |--------------|----------------|----------------|----------------|---------| | 1 | Rockwell | Olivia | 12345 | 4.0 | | 2 | Hall | Alexander | 23456 | 3.5 | | 3 | Martinez | Jose | 34567 | 2.8 | | 4 | McMillan | Steven | 45678 | 3.6 | | 5 | Wiseman | Christopher | 98765 | 3.2 | | 6 | White | Sarah | 87654 | 4.0 | **Details:** - **Record #**: A sequential identifier for each student record. - **Last Name**: The surname of the student. - **First Name**: The given name of the student. - **Student ID**: A unique identifier assigned to each student. - **GPA**: The student's Grade Point Average, reflecting their academic performance. This table is useful for educational institutions to track student information and assess academic performance via GPAs.
The image shows a text-based interface used to create a student database. Users are prompted to enter student information in the format: "FirstName LastName studentID studentGPA". The text shows several examples of data entry:

1. Olivia Rockwell 12345 4.0
2. Alexander Hall 23456 3.5
3. Jose Martinez 34567 2.8
4. Steven McMillan 45678 3.6
5. Christopher Wiseman 98765 3.2
6. Sarah White 87654 4.0

The user types "quit" to stop entering data. Afterwards, it displays the records that have been entered:

- 1. Olivia, Rockwell, 12345, 4.0
- 2. Alexander, Hall, 23456, 3.5
- 3. Jose, Martinez, 34567, 2.8
- 4. Steven, McMillan, 45678, 3.6
- 5. Christopher, Wiseman, 98765, 3.2
- 6. Sarah, White, 87654, 4.0

Finally, the text suggests checking the "student_database.csv" file by opening it with Microsoft Excel for further data manipulation or analysis. Overall, the interface allows for easy input and organization of student data.
Transcribed Image Text:The image shows a text-based interface used to create a student database. Users are prompted to enter student information in the format: "FirstName LastName studentID studentGPA". The text shows several examples of data entry: 1. Olivia Rockwell 12345 4.0 2. Alexander Hall 23456 3.5 3. Jose Martinez 34567 2.8 4. Steven McMillan 45678 3.6 5. Christopher Wiseman 98765 3.2 6. Sarah White 87654 4.0 The user types "quit" to stop entering data. Afterwards, it displays the records that have been entered: - 1. Olivia, Rockwell, 12345, 4.0 - 2. Alexander, Hall, 23456, 3.5 - 3. Jose, Martinez, 34567, 2.8 - 4. Steven, McMillan, 45678, 3.6 - 5. Christopher, Wiseman, 98765, 3.2 - 6. Sarah, White, 87654, 4.0 Finally, the text suggests checking the "student_database.csv" file by opening it with Microsoft Excel for further data manipulation or analysis. Overall, the interface allows for easy input and organization of student data.
Expert Solution
Step 1

The program is given below:-

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY