Develop a C++ program to connect to a MS Access database (“Student.accdb” – attached to this assignment) and use SQL commands to manipulate its records. You may use MS Access, SQLite or another DB engine and drivers. Scope The user will be given a menu to choose from the following options: Press (S) to select and display all students records Press (D) to delete a student by ID# Press (U) to update a student’s graduation year Press (I) to insert a new student Press (Q) to quit For user option# 1, first display the header and then display every record on a separate line. See example below Student ID First Name Last Name Major Graduation Year 1 Joe Doe Computer Science 2018 2 Emma Smith Electrical Engineering 2019 3 Juan Perez Marketing 2019 For user option#2, confirm back to the user whether the deletion was successful or the ID provided was not found in the students records. For user option#3, prompt the user to enter a student ID, validate if the student ID exists in the database. If it does not exist, then display a message to user that the student ID does not exist. If it exists, then prompt the user to enter the new graduation year. The new graduation year should be no later than 4 years from the current year. For example, if the user enters “2035”, you should display a message to the user saying invalid graduation year. Then prompt again to enter a valid year. For user option# 4, prompt the user to enter the first name, last name, major, and graduation year. Note that the student ID will automatically be generated. DO NOT PROMPT FOR STUDENT ID. Graduation year rules are the same as described in user option# 3 above. After every operation completion, you need to re-display the menu until the user selects option# 5 to quit the program.
Develop a C++
Scope
The user will be given a menu to choose from the following options:
- Press (S) to select and display all students records
- Press (D) to delete a student by ID#
- Press (U) to update a student’s graduation year
- Press (I) to insert a new student
- Press (Q) to quit
For user option# 1, first display the header and then display every record on a separate line. See example below
Student ID | First Name | Last Name | Major | Graduation Year |
1 | Joe | Doe | Computer Science | 2018 |
2 | Emma | Smith | Electrical Engineering | 2019 |
3 | Juan | Perez | Marketing | 2019 |
For user option#2, confirm back to the user whether the deletion was successful or the ID provided was not found in the students records.
For user option#3, prompt the user to enter a student ID, validate if the student ID exists in the database. If it does not exist, then display a message to user that the student ID does not exist. If it exists, then prompt the user to enter the new graduation year. The new graduation year should be no later than 4 years from the current year. For example, if the user enters “2035”, you should display a message to the user saying invalid graduation year. Then prompt again to enter a valid year.
For user option# 4, prompt the user to enter the first name, last name, major, and graduation year. Note that the student ID will automatically be generated. DO NOT PROMPT FOR STUDENT ID. Graduation year rules are the same as described in user option# 3 above.
After every operation completion, you need to re-display the menu until the user selects option# 5 to quit the program.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps