Question: Help Q4 [15 points] Database. 1. Using NetBeans, create a new database and call it DbFinal, and give it the username userfinal, and the password

 Help Q4 [15 points] Database. 1. Using NetBeans, create a new

database and call it DbFinal, and give it the username "userfinal", and

Help

Q4 [15 points] Database. 1. Using NetBeans, create a new database and call it DbFinal, and give it the username "userfinal", and the password "dbpassfinal. 2. Implement a Java class called StudentDataBase, which has the following three methods: 1- public void create Table(). This method connects to the database DbFinal, and creates a new table called Student in Db Final. The table contains the fields: i. Id, Integer, not null, primary key. ii. StName, VARCHAR(255) iii. GPA, Integer iv. Major, VARCHAR(255) I 2- public void insertData(). This method connects to the database DbFinal, and inserts the following records into the Student table: anu misers the TUNTUwing Telurus TITLULITE Suuenil tavie. 112, Ali, 92, Computer Science 214, Malak, 78, Software Engineering 628, Enas, 84, Physics 3- public void getData(). This method connects to the database Db Final and retrieves each student record that has the GPA greater than 80 (i.e., GPA>80). Then, the method prints (using System.out.println) the id and name fields of each retrieved record. Important note: Inside each of the above three methods, you must write all the necessary code to connect to the database, create and execute statements, and close the connection. You must also write the necessary try-catch blocks. In the catch blocks, call the printStackTrace() method. 4- Main method. This method creates and instantiates and object of type StudentDataBase, then calls the methods createTable(), insertData(), and getData(). T

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!