Before reading further, read the previous parts of this articles.
Now let's explain further about the procedure involved for an employee.
Transactions involved for an Authorized Employee
This module also contains two separate Java files, EmployeeMain.java and ConnectDB.java in the same way as explained for the customer module.
The following processes can be done for an employee:
- Can check customer's details
- Can check his/her details
- Can change his/her password
Although there can be much more processes done for an employee like withdrawing money, updating customer details, and so on, but here we are just giving a few examples and all the rest you can try yourself.
The database schema table created for an employee is as in the following:
For now we are working with the employee schema table, so the following are the contents of the employee table.
Now let's move to the coding part for an employee and database.
Code Example
EmployeeMain.java
ConnectDB.java
- 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;
- }
- }
We will work for an employee named “Gops” for getting various outputs.
Here are the following outputs.
Output 1: Display customer details
We will get the details of the following two customers.
The following shows the details of Shubham and Harshit:
Output 2: Display my details
Output 3: Details of another employee “Abhi”
Output 4: Change my password
Output 5: If EmpID or Password are incorrect
In the preceding output we can see that the given EmpID is wrong and that is why the incorrect match occurred.
In the next part, the admin module has been discussed.
Thank you, keep learning and sharing.