Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 . ) Modify 1 . ) from above. Add a new Method called selectDB ( ) that takes only one argument, SID. When a

2.) Modify 1.) 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 s1= new Student();
s1.selectDB(4); //accessing DB
s1.display(); //displays all data from DB for student with id=4
3.) Modify 2.) from above. This time we are add another method called insertDB(). This method will take all 5 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 s2=new Student();
s2.insertDB(33,Frank,Mayes,fmayes@yahoo.com,3.3);
s2.display();
4.) Lastly add 2 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

25 Vba Macros For Data Analysis In Microsoft Excel

Authors: Klemens Nguyen

1st Edition

B0CNSXYMTC, 979-8868455629

More Books

Students also viewed these Databases questions

Question

4. Choose appropriate and powerful language

Answered: 1 week ago

Question

2. Choose an appropriate organizational pattern for your speech

Answered: 1 week ago