Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a GUI app that allows user to add new employees to the Personnel database.

ID: 3659658 • Letter: W

Question

Write a GUI app that allows user to add new employees to the Personnel database. import java.sql.*; public class PDC { public static void main(String[] args) { final String DB_URL = "jdbc:derby:Personnel"; try { Connection conn = DriverManager.getConnection(DB_URL); Statement stmt = conn.createStatement(); String sql = "CREATE TABLE EMPLOYEE" + "(EmployeeId CHAR(10) NOT NULL PRIMARY KEY, "+ " Name CHAR(25)," + "Position CHAR(25)," + "HPR CHAR(6))"; stmt.execute(sql); sql = "INSERT INTO CUSTOMER VALUES" + "('12001', 'Samantha Ruin','Care Taker',"+ " '10.00')"; stmt.executeUpdate(sql); sql = "INSERT INTO CUSTOMER VALUES" + "('12002', 'Ann Presley','Food Prep',"+ " '11.00')"; stmt.executeUpdate(sql); sql = "INSERT INTO CUSTOMER VALUES" + "('12003', 'Mark Black','Van Pool',"+ " '12.00')"; stmt.executeUpdate(sql); sql = "INSERT INTO CUSTOMER VALUES" + "('12004', 'Tom Burns','Event Coordinator',"+ " '15.00')"; stmt.executeUpdate(sql); sql = "INSERT INTO CUSTOMER VALUES" + "('12005', 'Shela Stern','Counceler',"+ " '15.00')"; stmt.executeUpdate(sql); sql = "INSERT INTO CUSTOMER VALUES" + "('12006', 'Rog Pould','Receptionist',"+ " '13.00')"; stmt.executeUpdate(sql); conn.close(); } catch (Exception ex) { System.out.println("ERROR: " + ex.getMessage()); } } }

Explanation / Answer

your code is correct, what is the problem :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote