Question
Develop a C++ program to connect to a MS Access database (Student.accdb provided on D2L) and use SQL commands to manipulate its records. The user
Develop a C++ program to connect to a MS Access database (Student.accdb provided on D2L) and use SQL commands to manipulate its records.
The user will be given a menu to choose from the following options:
1- Press (S) to select and display all students records 2- Press (D) to delete a student by ID# 3- Press (U) to update a students graduation year 4- Press (I) to insert a new student 5- 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.
Thank you for your help.
Here is a screenshot of Student.accdb that was given to us. (if needed)
student: Database- CUsers' Sean Downloadststudent.accdb (Access 2007 - 2016 file format) - Access Tell me what you want to do New XDelete -More Table Tools Sign in Create External Data Database Tools Fields Table Cut Copy Format Painter File Home abc Replace Go To. Select- Ascending Selection Calibri (Detail) Descending Advanced-,JE Save Spelling View Paste Filter Remove Sort Toggle Filter Al Clipboard Sort & Filter Find Text Formatting STUDENT Major FirstName 1 Joe 2 Emma 3 Juan 4 Tom 5 Ella 6 Oliver 7 Lea LastName Doe Smith Perez Lee Fenda Torres Martinez Computer Science Electrical Engineering Marketing Accounting Finance Business Communication GraduationClick to Add 2018 2019 2019 2020 2019 2018 2020 Tables New Record: 14 2 017 H No Filter Search Datasheet View Num Lock 7:19 PM O Type here to search 3/6/2018 4 student: Database- CUsers' Sean Downloadststudent.accdb (Access 2007 - 2016 file format) - Access Tell me what you want to do New XDelete -More Table Tools Sign in Create External Data Database Tools Fields Table Cut Copy Format Painter File Home abc Replace Go To. Select- Ascending Selection Calibri (Detail) Descending Advanced-,JE Save Spelling View Paste Filter Remove Sort Toggle Filter Al Clipboard Sort & Filter Find Text Formatting STUDENT Major FirstName 1 Joe 2 Emma 3 Juan 4 Tom 5 Ella 6 Oliver 7 Lea LastName Doe Smith Perez Lee Fenda Torres Martinez Computer Science Electrical Engineering Marketing Accounting Finance Business Communication GraduationClick to Add 2018 2019 2019 2020 2019 2018 2020 Tables New Record: 14 2 017 H No Filter Search Datasheet View Num Lock 7:19 PM O Type here to search 3/6/2018 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started