The preceding article begins with the explanation of the administrator module for various transactions.
Before reading further, read the previous part of this article.
Transactions involved for Authorized Administrator
The administrators are the personnel authorized for every type of transaction or process related to employees or customers or about him/herself. Likewise, this administrator module also contains such types of transactions associated with customers or employees.
This module is also made by the two separate Java files AdminMain.java and ConnectDB.java.
The following are transactions associated with the administrator:
- Can check details of any customer.
- Can check details of any employee.
- Can change the password of any customer.
- Can change the password of any employee.
- Can change his/her password.
The database schema table created for the admin is the following:
For now, we are working with admin schema table, so the following are the contents of the admin table.
Now we are in a position to see the code example for the admin module.
- package mydb;
- import java.sql.*;
-
- public class ConnectDB {
- public Connection c() throws Exception{
- Class.forName ("com.mysql.jdbc.Driver");
- Connection con= DriverManager.getConnection("jdbc:mysql://localhost:3306/bankdb", "root", "toor");
- return con;
- }
- }
AdminMain.java
Various outputs
Output 1: Can check details of any customer.
Here are the outputs of checking the details of two customers by the two admins “eddys” and “ashish” for “gaurav” and “rahul”.
Output 2: Can check details of any employee.
Again here are the outputs of checking the details of the two employees by two admins “avadh” and “ashish” for “Gops” and “Abhi”.
Output 3: Can change the password of any customer.
The Customer password is now changed.
Output 4: Can change the password of any employee.
The Employee password is now changed.
Output 5: Can change his/her password.
Likewise, you can also add other authorization for an admin or customer or an employee.
The next part explains the entire module together in which a person gets the option to choose his status using the authentication process and it will be some other aspect.
Thank you, keep learning and sharing.