Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 . ) Modify 1 . ) from above. Add a new Method called selectDB ( ) that takes only one argument, SID. When a
Modify from above. Add a new Method called selectDB that takes only one argument, SID. When a user calls this method, it should SELECT from the database that Student and get all the Students data from the database, and put this data into the appropriate properties. Hint: You will use an SQL Select statement here. Test out this method in the main.
Testing Code in Main method
Student s new Student;
sselectDB; accessing DB
sdisplay; displays all data from DB for student with id
Modify from above. This time we are add another method called insertDB This method will take all data elements as arguments. This method will then Insert this information into the Student table, as well as fill up the object with the data provided. Hint: You will use an SQL Insert statement here.
Testing Code in Main method
Student snew Student;
sinsertDBFrankMayesfmayes@yahoo.com;
sdisplay;
Lastly add functions to your Student class, updateDB and deleteDB These functions will update and delete student data in the database.
Step 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