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?

Content of student_database.csv after execution
fx
H13
A
в
D
E
F
1 Record #
Last Name First Name Student ID GPA
1 Olivia
2 Alexander Hall
2
Rockwell
12345
3
23456
3.5
4
3 Jose
Martinez
34567
2.8
5
4 Steven
McMillan
45678
3.6
5 Christopher Wiseman
6 Sarah
6.
98765
3.2
7
White
87654
4
8
9
10
m23 m
Transcribed Image Text:Content of student_database.csv after execution fx H13 A в D E F 1 Record # Last Name First Name Student ID GPA 1 Olivia 2 Alexander Hall 2 Rockwell 12345 3 23456 3.5 4 3 Jose Martinez 34567 2.8 5 4 Steven McMillan 45678 3.6 5 Christopher Wiseman 6 Sarah 6. 98765 3.2 7 White 87654 4 8 9 10 m23 m
This program creates student database:
Enter student information in the following format (or "quit"):
"FirstName LastName studentID studentGPA"
Olivia Rockwell 12345 4.0
Enter student information in the following format (or "quit"):
"FirstName LastName studentID studentGPA"
Alexander Hall 23456 3.5
Enter student information in the following format (or "quit"):
"FirstName LastName studentID studentGPA"
Jose Martinez 34567 2.8
Enter student information in the following format (or "quit"):
"FirstName LastName studentID studentGPA"
Steven McMillan 45678 3.6
Enter student information in the following format (or "quit"):
"FirstName LastName studentID studentGPA"
Christopher Wiseman 98765 3.2
Enter student information in the following format (or "quit"):
"FirstName LastName studentID studentGPA"
Sarah White 87654 4.0
Enter student information in the following format (or "quit"):
"FirstName LastName studentID studentGPA"
quit
Here are the records you have 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
Check "student_database.csv" file by openning it with Microsoft Excel
Transcribed Image Text:This program creates student database: Enter student information in the following format (or "quit"): "FirstName LastName studentID studentGPA" Olivia Rockwell 12345 4.0 Enter student information in the following format (or "quit"): "FirstName LastName studentID studentGPA" Alexander Hall 23456 3.5 Enter student information in the following format (or "quit"): "FirstName LastName studentID studentGPA" Jose Martinez 34567 2.8 Enter student information in the following format (or "quit"): "FirstName LastName studentID studentGPA" Steven McMillan 45678 3.6 Enter student information in the following format (or "quit"): "FirstName LastName studentID studentGPA" Christopher Wiseman 98765 3.2 Enter student information in the following format (or "quit"): "FirstName LastName studentID studentGPA" Sarah White 87654 4.0 Enter student information in the following format (or "quit"): "FirstName LastName studentID studentGPA" quit Here are the records you have 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 Check "student_database.csv" file by openning it with Microsoft Excel
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
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