INSTRUCTIONS: 1) Create a table in the mma database to store the necessary data. To do that, you can use the SQL script stored in
INSTRUCTIONS:
1) Create a table in the mma database to store the necessary data. To do that, you can use the SQL script stored in the create_customer_table.sql file thats supplied.
2) Create a class named Customer that stores data for the users id, email address, first name, and last name as instance variables. Include a constructor for the Customer class which takes these four values as parameters to create an object. Create get and set methods for each of the four instance variables.
3) Create a class named CustomerDB that contains the methods necessary to get an array list of Customer objects, to get a Customer object for the customer with the specified id, and to add, update, or delete the specified customer. Other classes to support the data layer functions are allowed.
4) Create a CustomerManagerFrame class like the one shown above. This frame should display a table of customer data as well as the Add, Edit, and Delete buttons. This class must use the Customer and CustomerDB classes to work with the customer data.
5) Create a CustomerTableModel class for the JTable control used in the CustomerManagerFrame class.
6) Create a CustomerForm class that allows the user to add or edit customer data.
SQL SCRIPT TO CREATE TABLE:
USE mma;
DROP TABLE IF EXISTS Customer;
CREATE TABLE Customer
(
CustomerID INT PRIMARY KEY AUTO_INCREMENT,
FirstName VARCHAR(50),
LastName VARCHAR(50),
EmailAddress VARCHAR(50)
);
INSERT INTO Customer VALUES
(2, 'Michael ', 'Martin', 'michealmartin@hotmail.com'),
(3, 'Marjorie ', 'Galvan', 'marjgalvan@yahoo.com'),
(4, 'Rebecca', 'Cain', 'cainr76@aol.com'),
(5, 'Sam', 'Schildt', 'sam@cerners.com');
Customer data Management System (GUI) | Customer Manager Email cainr 76@aol.com margalvan@yahoo.com michealmartin@hotmail.com sam@cerners.com First Name Rebecca Last Name van Michael tin Add Edit Delete Operation . This application begins by displaying a table of customer dat:a . If the user clicks the Add button, the application allows the user to add customer data to the table (and the underlying database) the selected customer row in the table (and the database) from the table (and the database) . If the user selects a customer row and clicks the Edit button, the application allows the user to update the data for . If the user selects a customer row and clicks the Delete button, the application deletes the selected customer rowStep by Step Solution
There are 3 Steps involved in it
Step: 1
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